Skip to content

Commit 14f3195

Browse files
committed
fix(ci): enhance CodeQL workflow with language matrix and dynamic analysis category
1 parent 907daf7 commit 14f3195

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@ on:
99
- '**.js'
1010
- '**.go'
1111
- '!**_test.go'
12+
- '.github/workflows/codeql-analysis.yml'
1213
pull_request:
1314
# The branches below must be a subset of the branches above
1415
branches: [ main ]
1516
paths:
1617
- '**.js'
1718
- '**.go'
1819
- '!**_test.go'
20+
- '.github/workflows/codeql-analysis.yml'
1921
schedule:
2022
- cron: '45 22 * * 3'
23+
workflow_dispatch:
2124

2225
jobs:
2326
analyze:
24-
name: Analyze
27+
name: Analyze (${{ matrix.language }})
2528
runs-on: ubuntu-latest
2629
permissions:
2730
actions: read
@@ -30,20 +33,27 @@ jobs:
3033

3134
strategy:
3235
fail-fast: false
36+
matrix:
37+
language: [ 'go', 'javascript' ]
3338

3439
steps:
3540
- name: Checkout repository
3641
uses: actions/checkout@v5
3742

3843
- uses: actions/setup-go@v6
44+
if: matrix.language == 'go'
3945
with:
4046
go-version: stable
4147

4248
- name: Initialize CodeQL
4349
uses: github/codeql-action/init@v4
50+
with:
51+
languages: ${{ matrix.language }}
4452

4553
- name: Autobuild
4654
uses: github/codeql-action/autobuild@v4
4755

4856
- name: Perform CodeQL Analysis
4957
uses: github/codeql-action/analyze@v4
58+
with:
59+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)