From 06f1234b69676c63dae998a3539992c17700c9cc Mon Sep 17 00:00:00 2001 From: Jan Larwig Date: Thu, 26 Feb 2026 14:43:52 +0100 Subject: [PATCH] ci: ensure we always use the latest patch version of golang (#3349) Signed-off-by: Jan Larwig --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/publish-release.yml | 13 ++++++++++--- go.mod | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd9b6dbe..4c9b969e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,17 @@ jobs: - name: Check out code uses: actions/checkout@v6 + - name: Get Go version + run: | + version=$(grep "^go " go.mod | cut -d' ' -f2) + echo "version=${version}" >> "$GITHUB_OUTPUT" + id: go-version + - name: Set up Go uses: actions/setup-go@v6 with: - go-version-file: go.mod - id: go + go-version: ${{ steps.go-version.outputs.version }} + check-latest: true - name: Install golangci-lint env: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 9f235fb6..c71266c9 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -42,11 +42,18 @@ jobs: git tag -a "${version}" -m "Release ${version}" echo "version=${version}" >> $GITHUB_OUTPUT id: tag - - - name: Set up go + + - name: Get Go version + run: | + version=$(grep "^go " go.mod | cut -d' ' -f2) + echo "version=${version}" >> "$GITHUB_OUTPUT" + id: go-version + + - name: Set up Go uses: actions/setup-go@v6 with: - go-version-file: go.mod + go-version: ${{ steps.go-version.outputs.version }} + check-latest: true - name: Get dependencies env: diff --git a/go.mod b/go.mod index c998b25f..4f54660f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/oauth2-proxy/oauth2-proxy/v7 -go 1.25.6 +go 1.25.0 require ( cloud.google.com/go/compute/metadata v0.9.0