From c74d0816856efa8cda3375f506b06619f2a6f690 Mon Sep 17 00:00:00 2001 From: Chad Wilson Date: Sun, 31 Mar 2024 17:07:51 +0800 Subject: [PATCH] Pre-install correct Go version for CodeQL and lint Signed-off-by: Chad Wilson --- .github/workflows/codeql-analysis.yml | 5 +++++ .github/workflows/golangci-lint.yml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2733186ce..c43b16c56 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,6 +34,11 @@ jobs: - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6354aa950..1c4d64517 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,6 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: