From d3f44033b9b19497716bdc6ef773ef9051197e53 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 1 Nov 2026 11:31:23 +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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60176ee..f00768b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,18 @@ jobs: - name: checkout uses: actions/checkout@v4 + - 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@v5 with: - go-version: "1.23" + go-version: ${{ steps.gomod.outputs.version }} + check-latest: true id: go - name: build and test