Skip to content

Commit feea86e

Browse files
authored
Merge pull request #1810 from github/henrymercer/ci/use-platform-specific-bundles
Use platform specific bundles in PR checks
2 parents de6681c + 679aac1 commit feea86e

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

.github/actions/prepare-test/action.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,27 @@ runs:
2323
shell: bash
2424
run: |
2525
set -e # Fail this Action if `gh release list` fails.
26+
27+
if [[ "$RUNNER_OS" == "Linux" ]]; then
28+
artifact_name="codeql-bundle-linux64.tar.gz"
29+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
30+
artifact_name="codeql-bundle-osx64.tar.gz"
31+
elif [[ "$RUNNER_OS" == "Windows" ]]; then
32+
artifact_name="codeql-bundle-win64.tar.gz"
33+
else
34+
echo "::error::Unrecognized OS $RUNNER_OS"
35+
exit 1
36+
fi
37+
2638
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
27-
export LATEST=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
28-
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
39+
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
40+
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
2941
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
30-
export VERSION=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
31-
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$VERSION-manual/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
42+
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
43+
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version-manual/$artifact_name" >> $GITHUB_OUTPUT
3244
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
33-
export VERSION=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
34-
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$VERSION/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
45+
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
46+
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
3547
elif [[ ${{ inputs.version }} == "latest" ]]; then
3648
echo "tools-url=latest" >> $GITHUB_OUTPUT
3749
elif [[ ${{ inputs.version }} == "cached" ]]; then

.github/workflows/__test-local-codeql.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/test-local-codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
- id: init
1313
uses: ./../action/init
1414
with:
15-
tools: ./codeql-bundle.tar.gz
15+
tools: ./codeql-bundle-linux64.tar.gz
1616
- uses: ./../action/.github/actions/setup-swift
1717
with:
1818
codeql-path: ${{ steps.init.outputs.codeql-path }}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy