Skip to content

Commit 15a61cb

Browse files
authored
GHA CI: fix CodeQL configuration (#24551)
* Really limit CodeQL analysis to libtorrent 2.0 branch Previously some required quotation marks are missing. * Revert `category` key There is no need to differentiate libtorrent in CodeQL config. Fix up d3063c9.
1 parent e63b381 commit 15a61cb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/ci_ubuntu.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
116116
- name: Initialize CodeQL
117117
uses: github/codeql-action/init@v4
118-
if: startsWith(matrix.libtorrent.version, 2.0) && (matrix.qbt_gui == 'GUI=ON')
118+
if: startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
119119
with:
120120
config-file: ./.github/workflows/helper/codeql/cpp.yaml
121121
languages: cpp
@@ -147,16 +147,16 @@ jobs:
147147
148148
- name: Run CodeQL analysis
149149
uses: github/codeql-action/analyze@v4
150-
if: startsWith(matrix.libtorrent.version, 2.0) && (matrix.qbt_gui == 'GUI=ON')
150+
if: startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
151151
with:
152-
category: "${{ github.base_ref || github.ref_name }} lt ${{ matrix.libtorrent.version }}"
152+
category: ${{ github.base_ref || github.ref_name }}
153153
output: sarif-results
154154
upload: failure-only
155155

156156
# Filter out results from 3rdparty codebases
157157
- name: Filter CodeQL results
158158
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1
159-
if: startsWith(matrix.libtorrent.version, 2.0) && (matrix.qbt_gui == 'GUI=ON')
159+
if: startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
160160
with:
161161
patterns: |
162162
-src/base/3rdparty/**
@@ -165,7 +165,7 @@ jobs:
165165

166166
- name: Upload CodeQL SARIF
167167
uses: github/codeql-action/upload-sarif@v4
168-
if: startsWith(matrix.libtorrent.version, 2.0) && (matrix.qbt_gui == 'GUI=ON')
168+
if: startsWith(matrix.libtorrent.version, '2.0') && (matrix.qbt_gui == 'GUI=ON')
169169
with:
170170
sarif_file: sarif-results/cpp.sarif
171171

0 commit comments

Comments
 (0)