@@ -2,42 +2,48 @@ name: "Code scanning - action"
22
33on :
44 push :
5+ branches : [ 'master', 'stable*', 'v[0-9]*' ]
56 pull_request :
7+ # The branches below must be a subset of the branches above
8+ branches : [ master ]
69 schedule :
710 - cron : ' 0 19 * * 0'
8-
9- permissions :
10- security-events : write
11+ workflow_dispatch :
1112
1213jobs :
13- CodeQL-Build :
14+ analyze :
15+ name : Analyze
16+
17+ strategy :
18+ fail-fast : false
19+ matrix :
20+ include :
21+ - language : javascript-typescript
22+ build-mode : none
23+ - language : cpp
24+ build-mode : none
1425
1526 # CodeQL runs on ubuntu-latest and windows-latest
1627 runs-on : ubuntu-latest
28+ permissions :
29+ security-events : write
30+ # required to fetch internal or private CodeQL packs
31+ packages : read
1732
1833 steps :
1934 - name : Checkout repository
2035 uses : actions/checkout@main
21- with :
22- # We must fetch at least the immediate parents so that if this is
23- # a pull request then we can checkout the head.
24- fetch-depth : 2
25-
26- # If this run was triggered by a pull request event, then checkout
27- # the head of the pull request instead of the merge commit.
28- - run : git checkout HEAD^2
29- if : ${{ github.event_name == 'pull_request' }}
30-
36+
3137 # Initializes the CodeQL tools for scanning.
3238 - name : Initialize CodeQL
33- uses : github/codeql-action/init@v3
39+ uses : github/codeql-action/init@v4
3440 with :
35- languages : javascript
36-
37- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
38- # If this step fails, then you should remove it and run the build manually (see below)
39- - name : Autobuild
40- uses : github/codeql-action/autobuild@v3
41+ languages : ${{ matrix.language }}
42+ build-mode : ${{ matrix.build-mode }}
43+ # # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
44+ # # If this step fails, then you should remove it and run the build manually (see below)
45+ # - name: Autobuild
46+ # uses: github/codeql-action/autobuild@v3
4147
4248 # ℹ️ Command-line programs to run using the OS shell.
4349 # 📚 https://git.io/JvXDl
5157 # make release
5258
5359 - name : Perform CodeQL Analysis
54- uses : github/codeql-action/analyze@v3
60+ uses : github/codeql-action/analyze@v4
61+ with :
62+ category : " /language:${{matrix.language}}"
0 commit comments