@@ -29,24 +29,27 @@ runs:
29
29
-id :get-url
30
30
name :Determine URL
31
31
shell :bash
32
+ env :
33
+ VERSION :${{ inputs.version }}
34
+ USE_ALL_PLATFORM_BUNDLE :${{ inputs.use-all-platform-bundle }}
32
35
run :|
33
36
set -e # Fail this Action if `gh release list` fails.
34
37
35
- if [[${{ inputs.version }} == "linked" ]]; then
38
+ if [["$VERSION" == "linked" ]]; then
36
39
echo "tools-url=linked" >> "$GITHUB_OUTPUT"
37
40
exit 0
38
- elif [[${{ inputs.version }} == "default" ]]; then
41
+ elif [["$VERSION" == "default" ]]; then
39
42
echo "tools-url=" >> "$GITHUB_OUTPUT"
40
43
exit 0
41
44
fi
42
45
43
- if [[${{ inputs.version }} == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
46
+ if [["$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
44
47
extension="tar.zst"
45
48
else
46
49
extension="tar.gz"
47
50
fi
48
51
49
- if [[${{ inputs.use-all-platform-bundle }} == "true" ]]; then
52
+ if [["$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
50
53
artifact_name="codeql-bundle.$extension"
51
54
elif [[ "$RUNNER_OS" == "Linux" ]]; then
52
55
artifact_name="codeql-bundle-linux64.$extension"
@@ -59,14 +62,14 @@ runs:
59
62
exit 1
60
63
fi
61
64
62
- if [[${{ inputs.version }} == "nightly-latest" ]]; then
65
+ if [["$VERSION" == "nightly-latest" ]]; then
63
66
tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
64
67
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$tag/$artifact_name" >> $GITHUB_OUTPUT
65
- elif [[${{ inputs.version }} == *"nightly"* ]]; then
66
- version=`echo${{ inputs.version }} | sed -e 's/^.*\-//'`
68
+ elif [["$VERSION" == *"nightly"* ]]; then
69
+ version=`echo"$VERSION" | sed -e 's/^.*\-//'`
67
70
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
68
- elif [[${{ inputs.version }} == *"stable"* ]]; then
69
- version=`echo${{ inputs.version }} | sed -e 's/^.*\-//'`
71
+ elif [["$VERSION" == *"stable"* ]]; then
72
+ version=`echo"$VERSION" | sed -e 's/^.*\-//'`
70
73
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
71
74
else
72
75
echo "::error::Unrecognized version specified!"