From 28a1fbc3f2e18b73aa34afdd970a465bf11f086c Mon Sep 17 00:00:00 2001 From: dagecko Date: Sat, 28 Mar 2026 15:57:55 -0400 Subject: [PATCH] fix: pin 6 actions to commit SHA, extract 1 expression to env var --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 6 ++++-- .github/workflows/reusable-release.yml | 2 +- .github/workflows/reusable-test.yml | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 757689f3..e82760b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: # Package manager setup - name: Setup pnpm if: matrix.pm == 'pnpm' - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 with: version: latest @@ -57,7 +57,7 @@ jobs: - name: Setup Bun if: matrix.pm == 'bun' - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 # Cache configuration - name: Get npm cache directory diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85a48c28..524880a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,13 @@ jobs: - name: Validate version tag run: | - if ! [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if ! [[ "${REF_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Invalid version tag format. Expected vX.Y.Z" exit 1 fi + env: + REF_NAME: ${{ github.ref_name }} - name: Verify plugin.json version matches tag env: TAG_NAME: ${{ github.ref_name }} @@ -61,7 +63,7 @@ jobs: EOF - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2 with: body_path: release_body.md generate_release_notes: true diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index d5a121d8..c5df4136 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -49,7 +49,7 @@ jobs: EOF - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2 with: tag_name: ${{ inputs.tag }} body_path: release_body.md diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index de55605c..2f362e2d 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -36,7 +36,7 @@ jobs: - name: Setup pnpm if: inputs.package-manager == 'pnpm' - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 with: version: latest @@ -49,7 +49,7 @@ jobs: - name: Setup Bun if: inputs.package-manager == 'bun' - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 - name: Get npm cache directory if: inputs.package-manager == 'npm'