File tree 1 file changed +12
-6
lines changed
.github/actions/install-codeql
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,28 @@ description: |
5
5
outputs :
6
6
codeql-cli-version :
7
7
description : " The version of the CodeQL CLI that was installed or retrieved from cache"
8
- value : ${{ steps.install- codeql.outputs.codeql-cli-version }}
8
+ value : ${{ steps.codeql-version .outputs.codeql-cli-version }}
9
9
10
10
runs :
11
11
using : composite
12
12
steps :
13
+ - name : " CodeQL Version"
14
+ id : codeql-version
15
+ shell : bash
16
+ run : |
17
+ echo "Reading CodeQL CLI version from .codeqlversion file."
18
+ CODEQL_CLI_VERSION=$(cat ./.codeqlversion)
19
+ echo "CODEQL_CLI_VERSION=${CODEQL_CLI_VERSION}" >> $GITHUB_ENV
20
+ echo "codeql-cli-version=${CODEQL_CLI_VERSION}" >> $GITHUB_OUTPUT
21
+
13
22
- name : Cache CodeQL
14
23
id : cache-codeql
15
24
uses : actions/cache@v4
16
25
with :
17
26
# A list of files, directories, and wildcard patterns to cache and restore
18
27
path : ${{github.workspace}}/codeql_home
19
28
# An explicit key for restoring and saving the cache
20
- key : codeql-home-${{ inputs .codeql-cli-version }}
29
+ key : codeql-home-${{ steps.codeql-version.outputs .codeql-cli-version }}
21
30
22
31
- name : Install CodeQL
23
32
id : install-codeql
26
35
env :
27
36
GITHUB_TOKEN : ${{ github.token }}
28
37
CODEQL_HOME : ${{ github.workspace }}/codeql_home
38
+ CODEQL_CLI_VERSION : ${{ steps.codeql-version.outputs.codeql-cli-version }}
29
39
run : |
30
- set -e
31
-
32
- echo "Reading CodeQL CLI version from .codeqlversion file."
33
- CODEQL_CLI_VERSION=$(cat ./.codeqlversion)
34
40
echo "Installing CodeQL CLI v${CODEQL_CLI_VERSION}."
35
41
36
42
mkdir -p $CODEQL_HOME
You can’t perform that action at this time.
0 commit comments