master
yml 49 lines 1.33 KB
Raw
1 # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
2 name: CodeQL
3
4 on:
5 workflow_dispatch:
6 push:
7 branches: [ master ]
8 pull_request:
9 # The branches below must be a subset of the branches above
10 branches: [ master ]
11 paths-ignore:
12 - '**/*.md'
13 schedule:
14 - cron: '30 12 * * 2'
15
16 permissions:
17 contents: read # to fetch code (actions/checkout)
18 security-events: write # (github/codeql-action/autobuild)
19
20 concurrency:
21 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
22 cancel-in-progress: true
23
24 jobs:
25 codeql:
26 if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch'
27 runs-on: ubuntu-latest
28 timeout-minutes: 20
29
30 steps:
31 - name: Checkout repository
32 uses: actions/checkout@v6
33
34 - name: Setup Go
35 uses: actions/setup-go@v6
36 with:
37 go-version-file: 'go.mod'
38
39 # Initializes the CodeQL tools for scanning.
40 - name: Initialize CodeQL
41 uses: github/codeql-action/init@v4
42 with:
43 languages: go
44
45 - name: Autobuild
46 uses: github/codeql-action/autobuild@v4
47
48 - name: Perform CodeQL Analysis
49 uses: github/codeql-action/analyze@v4