From eaf72d725030fe7d5a58db94b483cb0286809366 Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Thu, 4 Jun 2026 10:39:48 +0300 Subject: [PATCH] ci: derive Go version from go.mod in setup-go The test and golangci-lint jobs pinned setup-go to go-version: stable. When the go directive in go.mod requires a patch release newer than the latest stable Go that the runner has provisioned, setup-go installs the older stable toolchain and exports GOTOOLCHAIN=local, so the build, test, and lint steps fail with go.mod requires go >= X (running go Y; GOTOOLCHAIN=local). Read the required version from go.mod with go-version-file so setup-go installs exactly the toolchain the module declares, keeping CI in lockstep with the go directive on every bump. Assisted-By: Claude Signed-off-by: Aleksei Sviridkin --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5bd9900..5582328 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "stable" + go-version-file: go.mod - name: Build run: go build ./... @@ -51,7 +51,7 @@ jobs: - name: Setup Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - go-version: "stable" + go-version-file: go.mod - name: Run golangci-lint uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1