Skip to content

Commit 83027ba

Browse files
chore: update global workflows
1 parent b6c8eda commit 83027ba

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/codeql.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ jobs:
7070
if (hasYmlFiles) {
7171
console.log('Found GitHub Actions workflow files. Adding actions to the matrix.');
7272
matrix['include'].push({
73+
"category": "/language:actions",
7374
"language": "actions",
74-
"os": "ubuntu-latest",
75-
"name": "actions"
75+
"name": "actions",
76+
"os": "ubuntu-latest"
7677
});
7778
}
7879
@@ -100,11 +101,18 @@ jobs:
100101
// set name for matrix
101102
let name = osList.length === 1 ? normalizedKey : `${normalizedKey}, ${os}`
102103
104+
// set category for matrix
105+
let category = `/language:${normalizedKey}`
106+
if (normalizedKey === 'cpp') {
107+
category = `/language:cpp-${os.split('-')[0]}`
108+
}
109+
103110
// add to matrix
104111
matrix['include'].push({
112+
"category": category,
105113
"language": normalizedKey,
106-
"os": os,
107-
"name": name
114+
"name": name,
115+
"os": os
108116
})
109117
}
110118
}
@@ -194,8 +202,7 @@ jobs:
194202
- third-party
195203
196204
# Pre autobuild
197-
# create a file named .codeql-prebuild-${{ matrix.language }}.sh in the root of your repository
198-
# create a file named .codeql-build-${{ matrix.language }}.sh in the root of your repository
205+
# create a file named .codeql-prebuild-${{ matrix.language }}-${{ runner.os }}.sh in the root of your repository
199206
- name: Prebuild
200207
id: prebuild
201208
run: |
@@ -214,7 +221,7 @@ jobs:
214221
- name: Perform CodeQL Analysis
215222
uses: github/codeql-action/analyze@v3
216223
with:
217-
category: "/language:${{matrix.language}}"
224+
category: "${{ matrix.category }}"
218225
output: sarif-results
219226
upload: failure-only
220227

@@ -231,6 +238,7 @@ jobs:
231238
- name: Upload SARIF
232239
uses: github/codeql-action/upload-sarif@v3
233240
with:
241+
category: "${{ matrix.category }}"
234242
sarif_file: sarif-results/${{ matrix.language }}.sarif
235243

236244
- name: Upload loc as a Build Artifact

0 commit comments

Comments
 (0)