diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e67c461190af..664652d45ee4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1424,9 +1424,11 @@ jobs: - name: Setup Go for docs i18n if: matrix.requires_go == true + # The current workflow validates frozen targets whose go.mod may predate this patch pin. + # Keep the runner toolchain owned by the workflow while using the target only for cache keys. uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: - go-version-file: scripts/docs-i18n/go.mod + go-version: "1.25.12" cache-dependency-path: scripts/docs-i18n/go.sum - name: Verify docs i18n Go toolchain diff --git a/test/scripts/ci-workflow-guards.test.ts b/test/scripts/ci-workflow-guards.test.ts index 1be2028f0539..b17b2985f4ea 100644 --- a/test/scripts/ci-workflow-guards.test.ts +++ b/test/scripts/ci-workflow-guards.test.ts @@ -2084,7 +2084,7 @@ describe("ci workflow guards", () => { ); }); - it("keeps docs i18n CI on the patched preferred Go toolchain", () => { + it("keeps docs i18n CI on the workflow-owned patched Go toolchain", () => { const workflow = readCiWorkflow(); const nodeTestJob = workflow.jobs["checks-node-core-test-nondist-shard"]; const setupGoStep = nodeTestJob.steps.find( @@ -2097,11 +2097,11 @@ describe("ci workflow guards", () => { if: "matrix.requires_go == true", uses: SETUP_GO_V6, with: { - "go-version-file": "scripts/docs-i18n/go.mod", + "go-version": "1.25.12", "cache-dependency-path": "scripts/docs-i18n/go.sum", }, }); - expect(setupGoStep.with).not.toHaveProperty("go-version"); + expect(setupGoStep.with).not.toHaveProperty("go-version-file"); expect(verifyGoStep).toMatchObject({ if: "matrix.requires_go == true", run: 'test "$(go env GOVERSION)" = "go1.25.12"',