diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2d692779..6eff8617 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,7 +46,7 @@ jobs: matrix: include: - language: go - build-mode: autobuild + build-mode: manual # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' # Use `c-cpp` to analyze code written in C, C++ or both # Use 'java-kotlin' to analyze code written in Java, Kotlin or both @@ -78,15 +78,13 @@ jobs: # to build your code. # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' - shell: bash + - if: matrix.language == 'go' && matrix.build-mode == 'manual' + uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + - if: matrix.language == 'go' && matrix.build-mode == 'manual' run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 + go build - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3