| name: CodeQL |
| |
| on: |
| push: |
| branches: "*" |
| pull_request: |
| # The branches below must be a subset of the branches above |
| branches: "*" |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| analyse: |
| permissions: |
| actions: read # for github/codeql-action/init to get workflow details |
| contents: read # for actions/checkout to fetch code |
| security-events: write # for github/codeql-action/autobuild to send a status report |
| name: Analyse |
| runs-on: ubuntu-latest |
| |
| steps: |
| - name: Checkout repository |
| uses: actions/checkout@v7 |
| with: |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| |
| - name: Setup Go |
| uses: ./.github/actions/setup-go |
| |
| # Initializes the CodeQL tools for scanning. |
| - name: Initialize CodeQL |
| uses: github/codeql-action/init@v4 |
| with: |
| languages: go |
| |
| - name: Build Go Code |
| run: go build -v ./... |
| |
| - name: Perform CodeQL Analysis |
| uses: github/codeql-action/analyze@v4 |