From 0ef78ac580cf8d023941b855781da8b85f258521 Mon Sep 17 00:00:00 2001 From: "hugh-hackman[bot]" <266376744+hugh-hackman[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 23:44:40 +0000 Subject: [PATCH] feat: make reusable workflows strictly container-native (#10) Co-authored-by: gandalf-the-greybeard[bot] --- .github/workflows/plugin-ci.yaml | 7 +------ .github/workflows/plugin-release.yaml | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/plugin-ci.yaml b/.github/workflows/plugin-ci.yaml index 53d8ce5..175c280 100644 --- a/.github/workflows/plugin-ci.yaml +++ b/.github/workflows/plugin-ci.yaml @@ -12,18 +12,13 @@ on: jobs: ci: runs-on: local-ubuntu-latest + container: node:${{ inputs.node-version }} timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - cache: 'npm' - - name: Install dependencies run: npm ci diff --git a/.github/workflows/plugin-release.yaml b/.github/workflows/plugin-release.yaml index d26a31e..84defd4 100644 --- a/.github/workflows/plugin-release.yaml +++ b/.github/workflows/plugin-release.yaml @@ -35,6 +35,7 @@ jobs: release: needs: ci runs-on: local-ubuntu-latest + container: node:${{ inputs.node-version }} timeout-minutes: 10 steps: @@ -57,16 +58,15 @@ jobs: exit 1 fi - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - cache: 'npm' + - name: Install required tools + run: | + apt-get update && apt-get install -y jq curl git - name: Configure Git run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + 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 run: npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version @@ -139,6 +139,13 @@ jobs: git checkout -b "$BRANCH" 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 uses: softprops/action-gh-release@v2 with: