From 9e8cbee7cb5403cd5ffcd5b60358922300295b47 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 22 Sep 2025 12:30:45 +0200 Subject: [PATCH] Process nightly CI runs using `tools: nightly` --- .github/actions/prepare-test/action.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/actions/prepare-test/action.yml b/.github/actions/prepare-test/action.yml index 8e8227c3a..ed1171568 100644 --- a/.github/actions/prepare-test/action.yml +++ b/.github/actions/prepare-test/action.yml @@ -35,7 +35,10 @@ runs: run: | set -e # Fail this Action if `gh release list` fails. - if [[ "$VERSION" == "linked" ]]; then + if [[ "$VERSION" == "nightly" || "$VERSION" == "nightly-latest" ]]; then + echo "tools-url=nightly" >> "$GITHUB_OUTPUT" + exit 0 + elif [[ "$VERSION" == "linked" ]]; then echo "tools-url=linked" >> "$GITHUB_OUTPUT" exit 0 elif [[ "$VERSION" == "default" ]]; then @@ -43,29 +46,20 @@ runs: exit 0 fi - if [[ "$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then - extension="tar.zst" - else - extension="tar.gz" - fi - if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then - artifact_name="codeql-bundle.$extension" + artifact_name="codeql-bundle.tar.gz" elif [[ "$RUNNER_OS" == "Linux" ]]; then - artifact_name="codeql-bundle-linux64.$extension" + artifact_name="codeql-bundle-linux64.tar.gz" elif [[ "$RUNNER_OS" == "macOS" ]]; then - artifact_name="codeql-bundle-osx64.$extension" + artifact_name="codeql-bundle-osx64.tar.gz" elif [[ "$RUNNER_OS" == "Windows" ]]; then - artifact_name="codeql-bundle-win64.$extension" + artifact_name="codeql-bundle-win64.tar.gz" else echo "::error::Unrecognized OS $RUNNER_OS" exit 1 fi - if [[ "$VERSION" == "nightly-latest" ]]; then - tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3` - echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT - elif [[ "$VERSION" == *"nightly"* ]]; then + if [[ "$VERSION" == *"nightly"* ]]; then version=`echo "$VERSION" | sed -e 's/^.*\-//'` echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT elif [[ "$VERSION" == *"stable"* ]]; then