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