Skip to content

Commit 38590f2

Browse files
committed
Install a specific CodeQL version.
1 parent 7110e6e commit 38590f2

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,27 @@ jobs:
2525
src:
2626
- '${{ matrix.language }}/**'
2727
28-
- name: Initialize CodeQL
29-
if: steps.changes.outputs.src == 'true'
28+
# TODO: Consider to introduce caching for the CodeQL CLI.
29+
- name: Install CodeQL
30+
shell: bash
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}
33+
CODEQL_HOME: ${{ github.workspace }}/codeql_home
3034
run: |
31-
VERSION="$(find "${{ runner.tool_cache }}/CodeQL/" -maxdepth 1 -mindepth 1 -type d -print \
32-
| sort \
33-
| tail -n 1 \
34-
| tr -d '\n')"
35-
echo "$VERSION/x64/codeql" >> $GITHUB_PATH
35+
mkdir -p $CODEQL_HOME
36+
echo "Change directory to $CODEQL_HOME"
37+
pushd $CODEQL_HOME
38+
39+
echo "Downloading CodeQL CLI"
40+
gh release download v2.19.2 --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
41+
42+
echo "Unzipping CodeQL CLI"
43+
unzip -q codeql-linux64.zip
44+
45+
popd
46+
47+
echo "Adding CodeQL CLI to PATH"
48+
echo "$CODEQL_HOME/codeql" >> $GITHUB_PATH
3649
3750
- name: Install Packs
3851
if: steps.changes.outputs.src == 'true'

0 commit comments

Comments
 (0)