Skip to content

Commit 0ebf863

Browse files
committed
Upgrade CodeQL to Advanced with matrix (actions + csharp manual build)
1 parent d9f21e4 commit 0ebf863

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/codeql.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CodeQL
1+
name: CodeQL Advanced
22

33
on:
44
push:
@@ -8,20 +8,34 @@ on:
88
branches:
99
- master
1010
schedule:
11-
- cron: '0 6 * * 1'
11+
- cron: '42 10 * * 5'
1212

1313
jobs:
1414
analyze:
15+
name: Analyze (${{ matrix.language }})
1516
runs-on: ubuntu-latest
1617

1718
permissions:
1819
security-events: write
20+
packages: read
21+
actions: read
22+
contents: read
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: actions
29+
build-mode: none
30+
- language: csharp
31+
build-mode: manual
1932

2033
steps:
2134
- name: Checkout repository
2235
uses: actions/checkout@v4
2336

2437
- name: Setup dotnet
38+
if: matrix.language == 'csharp'
2539
uses: actions/setup-dotnet@v4
2640
with:
2741
dotnet-version: |
@@ -30,12 +44,16 @@ jobs:
3044
10.0.x
3145
3246
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@v3
47+
uses: github/codeql-action/init@v4
3448
with:
35-
languages: csharp
49+
languages: ${{ matrix.language }}
50+
build-mode: ${{ matrix.build-mode }}
3651

3752
- name: Build
53+
if: matrix.build-mode == 'manual'
3854
run: dotnet build --verbosity minimal
3955

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

0 commit comments

Comments
 (0)