-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.74 KB
/
codeql.yml
File metadata and controls
67 lines (57 loc) · 1.74 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
name: CodeQL
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
schedule:
- cron: "23 5 * * 1"
workflow_dispatch:
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: manual
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@v6
with:
go-version: "1.25"
cache-dependency-path: backend/go.sum
- name: Install swag
if: matrix.language == 'go'
run: go install github.com/swaggo/swag/cmd/swag@latest
- name: Generate Swagger docs
if: matrix.language == 'go'
working-directory: backend
run: swag init -d cmd/server,internal/handler -g main.go --parseDependency --parseInternal -o docs
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# The Go module lives in backend/ and its swagger docs package is
# generated above. Autobuild cannot locate the module from the repo
# root, so build explicitly from backend/ here.
- name: Build Go
if: matrix.language == 'go'
working-directory: backend
run: go build ./...
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"