Skip to content

Commit 475d46f

Browse files
authored
chore(ci): add codeql workflow (#118)
1 parent 993beb5 commit 475d46f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/codeql.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "CodeQL"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
analyze:
10+
name: Analyze
11+
runs-on: ubuntu-latest
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language: ["go"]
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b #v5.4.0
28+
with:
29+
go-version-file: tests/go.mod
30+
if: ${{ matrix.language == 'go' }}
31+
32+
- name: Initialize the CodeQL tools for scanning
33+
uses: github/codeql-action/init@v3
34+
with:
35+
languages: ${{ matrix.language }}
36+
timeout-minutes: 5
37+
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v3
40+
timeout-minutes: 10
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: "/language:${{matrix.language}}"
46+
timeout-minutes: 10

0 commit comments

Comments
 (0)