Skip to content

Commit 8c0517f

Browse files
committed
PR check: Ensure bundle added to toolcache
1 parent 0b20485 commit 8c0517f

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/__extract-direct-to-toolcache.yml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/extract-direct-to-toolcache.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,19 @@ steps:
2626
with:
2727
output: ${{ runner.temp }}/results
2828
upload-database: false
29+
- name: Install @actions/tool-cache
30+
run: npm install @actions/tool-cache
31+
- name: Check CodeQL is installed within the toolcache
32+
uses: actions/github-script@v7
33+
with:
34+
script: |
35+
const toolcache = require('@actions/tool-cache');
36+
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
37+
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
38+
if (allCodeqlVersions.length === 0) {
39+
throw new Error('CodeQL not found in toolcache');
40+
}
41+
if (allCodeqlVersions.length > 1) {
42+
throw new Error('Multiple CodeQL versions found in toolcache');
43+
}
44+
console.log(`CodeQL version: ${allCodeqlVersions[0]}`);

0 commit comments

Comments
 (0)