@@ -29,24 +29,27 @@ runs:
2929 - id : get-url
3030 name : Determine URL
3131 shell : bash
32+ env :
33+ VERSION : ${{ inputs.version }}
34+ USE_ALL_PLATFORM_BUNDLE : ${{ inputs.use-all-platform-bundle }}
3235 run : |
3336 set -e # Fail this Action if `gh release list` fails.
3437
35- if [[ ${{ inputs.version }} == "linked" ]]; then
38+ if [[ "$VERSION" == "linked" ]]; then
3639 echo "tools-url=linked" >> "$GITHUB_OUTPUT"
3740 exit 0
38- elif [[ ${{ inputs.version }} == "default" ]]; then
41+ elif [[ "$VERSION" == "default" ]]; then
3942 echo "tools-url=" >> "$GITHUB_OUTPUT"
4043 exit 0
4144 fi
4245
43- if [[ ${{ inputs.version }} == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
46+ if [[ "$VERSION" == "nightly-latest" && "$RUNNER_OS" != "Windows" ]]; then
4447 extension="tar.zst"
4548 else
4649 extension="tar.gz"
4750 fi
4851
49- if [[ ${{ inputs.use-all-platform-bundle }} == "true" ]]; then
52+ if [[ "$USE_ALL_PLATFORM_BUNDLE" == "true" ]]; then
5053 artifact_name="codeql-bundle.$extension"
5154 elif [[ "$RUNNER_OS" == "Linux" ]]; then
5255 artifact_name="codeql-bundle-linux64.$extension"
@@ -59,14 +62,14 @@ runs:
5962 exit 1
6063 fi
6164
62- if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
65+ if [[ "$VERSION" == "nightly-latest" ]]; then
6366 tag=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
6467 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/^.*\-//'`
6770 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/^.*\-//'`
7073 echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$version/$artifact_name" >> $GITHUB_OUTPUT
7174 else
7275 echo "::error::Unrecognized version specified!"
0 commit comments