File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,19 @@ steps:
26
26
with :
27
27
output : ${{ runner.temp }}/results
28
28
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]}`);
You can’t perform that action at this time.
0 commit comments