Skip to content

Bump golang version. #2486

Bump golang version.

Bump golang version. #2486

name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '22 2 * * 0'
jobs:
analyze:
name: Analyze
# Dependabot only has read permissions on push i.e. after merging a PR, and that causes failures because it needs
# 'write' permissions to upload the scan report to GitHub. This is a workaround to stop runs after merging a
# Dependabot PR, and always run when it comes from a pull request.
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Manually install the right version of Go
# See https://github.com/github/codeql-action/issues/1842 and https://github.com/github/codeql/issues/13992
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: go
config-file: .github/codeql/codeql-config.yml
build-mode: manual
dependency-caching: true
- name: Build for CodeQL
run: go build -o bin/manager ./cmd
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: '/language:go'