-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.22 KB
/
codeql-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: "CodeQL Analysis"
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
schedule:
- cron: '0 0 * * 1' # Runs every Monday at 00:00 UTC
jobs:
analyze:
name: Analyze
runs-on: self-hosted
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'go']
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install dependencies and build React app
working-directory: ./ui
run: |
npm ci
npm run build
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22.4'
- name: Tidy Go modules
working-directory: ./controller
run: go mod tidy
- name: Build Go code
working-directory: ./controller
run: go build -o main ./cmd/controllerservice
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2