Skip to content

Commit 4b13ea4

Browse files
committed
Upgrade workflow now provides codeql binary on path
This enables the python script to update the lock files
1 parent 8cfa9cf commit 4b13ea4

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/upgrade_codeql_dependencies.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v2
2222

23+
- name: Fetch CodeQL
24+
env:
25+
GITHUB_TOKEN: ${{ github.token }}
26+
RUNNER_TEMP: ${{ runner.temp }}
27+
run: |
28+
cd $RUNNER_TEMP
29+
gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
30+
unzip -q codeql-linux64.zip
31+
echo "$RUNNER_TEMP/codeql/" >> $GITHUB_PATH
32+
2333
- name: Install Python
2434
uses: actions/setup-python@v4
2535
with:
@@ -35,21 +45,12 @@ jobs:
3545
run: |
3646
python3 scripts/upgrade-codeql-dependencies/upgrade-codeql-dependencies.py --cli-version "$CODEQL_CLI_VERSION"
3747
38-
- name: Fetch CodeQL
39-
env:
40-
GITHUB_TOKEN: ${{ github.token }}
41-
RUNNER_TEMP: ${{ runner.temp }}
42-
run: |
43-
cd $RUNNER_TEMP
44-
gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
45-
unzip -q codeql-linux64.zip
46-
4748
- name: Update CodeQL formatting based on new CLI version
4849
env:
4950
RUNNER_TEMP: ${{ runner.temp }}
5051
run: |
51-
find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
52-
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
52+
find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
53+
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
5354
5455
- name: Create Pull Request
5556
uses: peter-evans/create-pull-request@v3

0 commit comments

Comments
 (0)