-
Notifications
You must be signed in to change notification settings - Fork 14
77 lines (67 loc) · 1.99 KB
/
Copy pathcodeql.yml
File metadata and controls
77 lines (67 loc) · 1.99 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '23 4 * * 1'
workflow_dispatch:
permissions:
contents: read
packages: read
security-events: write
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
tools: linked
- language: go
build-mode: manual
tools: nightly
- language: javascript-typescript
build-mode: none
tools: linked
- language: python
build-mode: none
tools: linked
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Node.js
if: matrix.language == 'go'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Build frontend
if: matrix.language == 'go'
working-directory: frontend
run: |
npm ci
npm run build
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
cache: true
- name: Initialize CodeQL
uses: github/codeql-action/init@37f2634a92ba38a0926ef79a0748ac8ae7d95ab2 # v4.37.8
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# The stable 2.26.3 bundle predates Go 1.27 support.
tools: ${{ matrix.tools }}
- name: Build Go
if: matrix.language == 'go'
run: go build ./...
- name: Analyze
uses: github/codeql-action/analyze@37f2634a92ba38a0926ef79a0748ac8ae7d95ab2 # v4.37.8