From 074508a2502d40c057d0b298174c10a03bf0c658 Mon Sep 17 00:00:00 2001 From: Francisc Balint <7178547+franciscbalint@users.noreply.github.com> Date: Sat, 17 Oct 2026 17:30:32 +0400 Subject: [PATCH] fix(ci): publish checkout pattern for CodeQL cache-poisoning Use refs/tags input for test/build jobs; keep tag_sha on release and registry publish jobs with environment: release (Pascal PR #18 lesson). Co-authored-by: Cursor --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6af7402..f3a8699 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -74,7 +74,7 @@ jobs: - name: Checkout tag uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - ref: ${{ needs.validate-tag.outputs.tag_sha }} + ref: refs/tags/${{ github.event.inputs.tag }} persist-credentials: false - name: Set up Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 @@ -110,6 +110,7 @@ jobs: needs: [validate-tag, publish] if: ${{ !cancelled() && !failure() }} runs-on: ubuntu-latest + environment: release permissions: contents: write steps: