feat: make reusable workflows strictly container-native (#10)
Co-authored-by: gandalf-the-greybeard[bot] <gandalf-the-greybeard[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4361c131f0
commit
0ef78ac580
@@ -12,18 +12,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: local-ubuntu-latest
|
runs-on: local-ubuntu-latest
|
||||||
|
container: node:${{ inputs.node-version }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ inputs.node-version }}
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
needs: ci
|
needs: ci
|
||||||
runs-on: local-ubuntu-latest
|
runs-on: local-ubuntu-latest
|
||||||
|
container: node:${{ inputs.node-version }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -57,16 +58,15 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Install required tools
|
||||||
uses: actions/setup-node@v4
|
run: |
|
||||||
with:
|
apt-get update && apt-get install -y jq curl git
|
||||||
node-version: ${{ inputs.node-version }}
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
git config user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
- name: Update version in package.json
|
- name: Update version in package.json
|
||||||
run: npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
|
run: npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
|
||||||
@@ -139,6 +139,13 @@ jobs:
|
|||||||
git checkout -b "$BRANCH"
|
git checkout -b "$BRANCH"
|
||||||
git push origin "$BRANCH" --tags
|
git push origin "$BRANCH" --tags
|
||||||
|
|
||||||
|
- name: Install GitHub CLI
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
|
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
||||||
|
apt-get update && apt-get install gh -y
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user