From 2ae531b5e535ca1e140769641b6d6911e74066ff Mon Sep 17 00:00:00 2001 From: Francisc Balint <7178547+franciscbalint@users.noreply.github.com> Date: Sat, 17 Oct 2026 17:31:07 +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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 92c426f..6d2236b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,11 +70,12 @@ jobs: needs: [validate-tag] if: ${{ !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} runs-on: ubuntu-latest + environment: release steps: - 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: Install build dependencies run: | @@ -92,6 +93,7 @@ jobs: needs: [validate-tag, test] if: ${{ !cancelled() && !failure() }} runs-on: ubuntu-latest + environment: release permissions: contents: write steps: