Skip to content

Commit

Permalink
PR check: Ensure bundle added to toolcache
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Dec 3, 2024
1 parent 0b20485 commit 8c0517f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/__extract-direct-to-toolcache.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions pr-checks/checks/extract-direct-to-toolcache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,19 @@ steps:
with:
output: ${{ runner.temp }}/results
upload-database: false
- name: Install @actions/tool-cache
run: npm install @actions/tool-cache
- name: Check CodeQL is installed within the toolcache
uses: actions/github-script@v7
with:
script: |
const toolcache = require('@actions/tool-cache');
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
if (allCodeqlVersions.length === 0) {
throw new Error('CodeQL not found in toolcache');
}
if (allCodeqlVersions.length > 1) {
throw new Error('Multiple CodeQL versions found in toolcache');
}
console.log(`CodeQL version: ${allCodeqlVersions[0]}`);

0 comments on commit 8c0517f

Please sign in to comment.