From 77ac8656edf0fcbd7588d44c97bd1b4a78a2d85b Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 1 Nov 2026 11:54:49 +0100 Subject: [PATCH] Take the CI Go version from go.mod CI pinned its Go version separately from go.mod. It now reads the major and minor version from the go directive and installs the latest patch release of it. --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83572e7..ab36d0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,18 @@ jobs: with: persist-credentials: false - - name: set up go 1.25 + - name: read go version from go.mod + id: gomod + run: | + version=$(awk '/^go /{split($2, v, "."); print v[1] "." v[2]; exit}' go.mod) + test -n "$version" + echo "version=$version" >> "$GITHUB_OUTPUT" + + - name: set up go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: ${{ steps.gomod.outputs.version }} + check-latest: true id: go - name: build and test