mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 09:40:17 +08:00
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: "Bundle: From toolcache"
|
|
description: "The CodeQL bundle should be cached within the toolcache"
|
|
versions:
|
|
- toolcache
|
|
steps:
|
|
- name: Install @actions/tool-cache
|
|
run: npm install @actions/tool-cache
|
|
- name: Check toolcache contains CodeQL
|
|
continue-on-error: true
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const toolcache = require('@actions/tool-cache');
|
|
const allCodeqlVersions = toolcache.findAllVersions('CodeQL');
|
|
if (allCodeqlVersions.length === 0) {
|
|
throw new Error(`CodeQL could not be found in the toolcache`);
|
|
}
|
|
- id: init
|
|
uses: ./../action/init
|
|
with:
|
|
languages: javascript
|
|
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
|
- name: Check CodeQL is installed within the toolcache
|
|
uses: actions/github-script@v8
|
|
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');
|
|
}
|