@@ -2,7 +2,7 @@ name: "Prepare test"
2
2
description : Performs some preparation to run tests
3
3
inputs :
4
4
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 "
6
6
required : true
7
7
use-all-platform-bundle :
8
8
description : " If true, we output a tools URL with codeql-bundle.tar.gz file rather than platform-specific URL"
32
32
run : |
33
33
set -e # Fail this Action if `gh release list` fails.
34
34
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
+
35
43
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
36
44
extension="tar.zst"
37
45
else
@@ -56,14 +64,10 @@ runs:
56
64
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
57
65
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
58
66
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
60
68
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
61
69
version=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
62
70
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
67
71
else
68
72
echo "::error::Unrecognized version specified!"
69
73
exit 1
0 commit comments