Skip to content

Commit dbc9fda

Browse files
committed
Use toolcache.ts in bundle-from-toolcache.yml
1 parent 6e38976 commit dbc9fda

2 files changed

Lines changed: 18 additions & 38 deletions

File tree

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

Lines changed: 13 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: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,16 @@ 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: cd ./../action && npx tsx ./pr-checks/toolcache.ts installed
10+
1811
- id: setup-codeql
1912
uses: ./../action/setup-codeql
2013
with:
2114
tools: ${{ steps.prepare-test.outputs.tools-url }}
15+
2216
- 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-
}
17+
run: cd ./../action && npx tsx ./pr-checks/toolcache.ts installed

0 commit comments

Comments
 (0)