Debian Codegraph @

.github/workflows/codeql-analysis.yml

raw
1 name: "CodeQL Analysis"
2 on:
3 push:
4 branches: [main]
5 pull_request:
6
7 concurrency:
8 group: ${{ github.workflow }}-${{ github.ref_name }}
9 cancel-in-progress: true
10
11 permissions: read-all
12
13 jobs:
14 CodeQL-Build:
15 permissions:
16 actions: read # for github/codeql-action/init to get workflow details
17 contents: read # for actions/checkout to fetch code
18 security-events: write # for github/codeql-action/autobuild to send a status report
19 runs-on: ubuntu-latest
20
21 steps:
22 - name: Checkout repository
23 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
24
25 - name: Setup Go
26 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
27 with:
28 go-version: oldstable
29 cache: false
30
31 - name: Cache Go
32 id: go-cache
33 uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
34 with:
35 path: |
36 ~/go/bin
37 ~/go/pkg/mod
38 key: go-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/go.sum') }}
39
40 # Initializes the CodeQL tools for scanning.
41 - name: Initialize CodeQL
42 uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
43 with:
44 languages: go
45
46 - name: Autobuild
47 uses: github/codeql-action/autobuild@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
48
49 - name: Perform CodeQL Analysis
50 uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5