Skip to content

Commit 00be9e9

Browse files
committed
update codeql and ignore contrib code
Update the CodeQL workflow to use newer versions of the actions. Configure it to directly check out the correct commit. And configure it to ignore the contrib-modules directory.
1 parent c00efa2 commit 00be9e9

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/codeql-analysis.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ jobs:
1212

1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
with:
17-
# We must fetch at least the immediate parents so that if this is
18-
# a pull request then we can checkout the head.
19-
fetch-depth: 2
20-
21-
# If this run was triggered by a pull request event, then checkout
22-
# the head of the pull request instead of the merge commit.
23-
- run: git checkout HEAD^2
24-
if: ${{ github.event_name == 'pull_request' }}
17+
# If this run was triggered by a pull request event, then checkout
18+
# the head of the pull request instead of the merge commit.
19+
ref: ${{ ( github.event_name == 'pull_request' && github.event.pull_request.head.sha ) || github.context.ref }}
2520

2621
# Initializes the CodeQL tools for scanning.
2722
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@v2
23+
uses: github/codeql-action/init@v3
24+
with:
25+
config: |
26+
paths-ignore:
27+
- contrib-modules
2928
# Override language selection by uncommenting this and choosing your
3029
# languages with:
3130
# languages: go, javascript, csharp, python, cpp, java
@@ -34,7 +33,7 @@ jobs:
3433
# Java). If this step fails, then you should remove it and run the build
3534
# manually (see below)
3635
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v2
36+
uses: github/codeql-action/autobuild@v3
3837

3938
# ℹ️ Command-line programs to run using the OS shell.
4039
# 📚 https://git.io/JvXDl
@@ -48,4 +47,4 @@ jobs:
4847
# make release
4948

5049
- name: Perform CodeQL Analysis
51-
uses: github/codeql-action/analyze@v2
50+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)