Skip to content

Commit a4f6fc0

Browse files
committed
Use toolcache.ts in bundle-from-toolcache.yml
1 parent 4b10a79 commit a4f6fc0

2 files changed

Lines changed: 26 additions & 38 deletions

File tree

‎.github/workflows/__bundle-from-toolcache.yml‎

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

‎pr-checks/checks/bundle-from-toolcache.yml‎

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,20 @@ name: "Bundle: From toolcache"
22
description: "The CodeQL bundle should be cached within the toolcache"
33
versions:
44
- toolcache
5+
installNode: true
56
steps:
6-
- name: Install @actions/tool-cache
7-
run: npm install @actions/tool-cache@3
87
- name: Check toolcache contains CodeQL
98
continue-on-error: true
10-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
11-
with:
12-
script: |
13-
const toolcache = require('@actions/tool-cache');
14-
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
15-
if (allCodeqlVersions.length === 0) {
16-
throw new Error(`CodeQL could not be found in the toolcache`);
17-
}
9+
run: |
10+
cd ./../action
11+
npx tsx ./pr-checks/toolcache.ts installed
12+
1813
- id: setup-codeql
1914
uses: ./../action/setup-codeql
2015
with:
2116
tools: ${{ steps.prepare-test.outputs.tools-url }}
17+
2218
- name: Check CodeQL is installed within the toolcache
23-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
24-
with:
25-
script: |
26-
const toolcache = require('@actions/tool-cache');
27-
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
28-
console.log(`Found CodeQL versions: ${allCodeqlVersions}`);
29-
if (allCodeqlVersions.length === 0) {
30-
throw new Error('CodeQL not found in toolcache');
31-
}
19+
run: |
20+
cd ./../action
21+
npx tsx ./pr-checks/toolcache.ts installed

0 commit comments

Comments
 (0)