From 71657681352537edad34503ea485cb337e18943b Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Fri, 26 Apr 2024 16:39:51 +0200 Subject: [PATCH] Go: put back go setup --- .github/workflows/go-tests.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 75c34f4f5de24..ad9075bebb77b 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -16,9 +16,6 @@ on: - .github/actions/** - codeql-workspace.yml -env: - GO_VERSION: '~1.22.0' - permissions: contents: read @@ -28,6 +25,21 @@ jobs: name: Test Linux (Ubuntu) runs-on: ubuntu-latest-xl steps: + - name: Get go version + shell: bash + run: | + ( + echo -n "GO_VERSION=" + bazel run @rules_go//go -- version | sed 's/go version go\(\S*\) .*/\1/' + ) | tee -a "$GITHUB_ENV" + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: false + id: go + - name: Check out code uses: actions/checkout@v4