Skip to content

Commit 67dbe11

Browse files
committed
github/workflows: add CodeQL workflow
1 parent ecae0af commit 67dbe11

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '0 20 * * *'
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-20.04
17+
18+
strategy:
19+
fail-fast: false
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 2
26+
27+
- name: Install Go
28+
uses: actions/setup-go@v2
29+
with:
30+
go-version: 1.15.x
31+
32+
- name: Cache Go module and build cache
33+
uses: actions/cache@v2
34+
with:
35+
key: analyze-go-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }}
36+
path: |
37+
~/go/pkg/mod
38+
~/.cache/go-build
39+
~/Library/Caches/go-build
40+
'%LocalAppData%\go-build'
41+
restore-keys: |
42+
analyze-go-
43+
44+
- name: Fetch vendors
45+
run: |
46+
go mod download
47+
go mod vendor
48+
49+
- name: Initialize CodeQL
50+
uses: github/codeql-action/init@v1
51+
with:
52+
languages: go
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)