@@ -2,7 +2,7 @@ name: "Prepare test"
22description : Performs some preparation to run tests
33inputs :
44 version :
5- description : " The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYY-MM-DD ', or 'stable-YYYY-MM-DD'. "
5+ description : " The version of the CodeQL CLI to use. Can be 'linked', 'default', 'nightly-latest', 'nightly-YYYYMMDD ', or 'stable-vX.Y.Z "
66 required : true
77 use-all-platform-bundle :
88 description : " If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
3232 run : |
3333 set -e # Fail this Action if `gh release list` fails.
3434
35+ if [[ ${{ inputs.version }} == "linked" ]]; then
36+ echo "tools-url=linked" >> "$GITHUB_OUTPUT"
37+ exit 0
38+ elif [[ ${{ inputs.version }} == "default" ]]; then
39+ echo "tools-url=" >> "$GITHUB_OUTPUT"
40+ exit 0
41+ fi
42+
3543 if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
3644 extension="tar.zst"
3745 else
@@ -56,14 +64,10 @@ runs:
5664 echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
5765 elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
5866 version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
59- echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version-manual /$artifact_name" >> $GITHUB_OUTPUT
67+ echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
6068 elif [[ ${{ inputs.version }} == *"stable"* ]]; then
6169 version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
6270 echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
63- elif [[ ${{ inputs.version }} == "linked" ]]; then
64- echo "tools-url=linked" >> $GITHUB_OUTPUT
65- elif [[ ${{ inputs.version }} == "default" ]]; then
66- echo "tools-url=" >> $GITHUB_OUTPUT
6771 else
6872 echo "::error::Unrecognized version specified!"
6973 exit 1
0 commit comments