From b398f1e6f37bde03da73c34994ccb62f831feb51 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Sat, 18 Sep 2021 00:18:47 +0800 Subject: [PATCH] Chore: force set latest go version to action --- .github/workflows/go.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2b9366f9..1058dd4f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,10 +6,15 @@ jobs: name: Build runs-on: ubuntu-latest steps: + - name: Get latest go version + id: version + run: | + echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') + - name: Setup Go uses: actions/setup-go@v2 with: - go-version: 1.17.x + go-version: ${{ steps.version.outputs.go_version }} - name: Check out code into the Go module directory uses: actions/checkout@v2