@@ -8,33 +8,39 @@ inputs:
88 token :
99 description : ' Testspace access token (required for private repos only)'
1010 required : false
11+ config-args :
12+ description : ' Custom "config" arguments'
13+ required : false
1114branding :
1215 color : green
1316 icon : terminal
1417runs :
1518 using : ' composite'
1619 steps :
1720 - run : |
18- if [ `uname -m` != 'x86_64' ]; then echo 'Error: Not supported platform.' && exit 1; fi
21+ base_url=https://testspace-client.s3.amazonaws.com
22+ if [ "$TESTSPACE_CLIENT_VER" ]; then version="-$TESTSPACE_CLIENT_VER"; fi
1923 case `uname -s` in
2024 Linux)
2125 folder=$HOME/bin
2226 mkdir -p $folder
23- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $RUNNER_TEMP
27+ arch=`uname -m`
28+ if [ "$arch" != "x86_64" ]; then version="-${arch}${version}"; fi
29+ curl -fsSL ${base_url}/testspace-linux${version}.tgz | tar -zxvf- -C $RUNNER_TEMP
2430 cp -f -p -u $RUNNER_TEMP/testspace $folder
2531 ;;
2632 Darwin)
2733 folder=$HOME/bin
2834 mkdir -p $folder
29- curl -fsSL https:// testspace-client.s3.amazonaws.com/testspace- darwin.tgz | tar -zxvf- -C $RUNNER_TEMP
35+ curl -fsSL ${base_url}/ testspace-darwin${version} .tgz | tar -zxvf- -C $RUNNER_TEMP
3036 rsync -t -u $RUNNER_TEMP/testspace $folder
3137 ;;
3238 *) # Windows
3339 folder=$LOCALAPPDATA\Programs\testspace
3440 mkdir -p "$folder"
35- curl -OsSL https:// testspace-client.s3.amazonaws.com/testspace- windows.zip
36- unzip -q -o testspace-windows.zip -d $RUNNER_TEMP
37- rm testspace-windows.zip
41+ curl -OsSL ${base_url}/ testspace-windows${version} .zip
42+ unzip -q -o testspace-windows${version} .zip -d $RUNNER_TEMP
43+ rm testspace-windows${version} .zip
3844 cp -f -p -u $RUNNER_TEMP/testspace.exe "$folder"
3945 ;;
4046 esac
4854 if [ "$token" ]; then
4955 echo "::add-mask::${{ inputs.token }}"
5056 if [ "${token%%:*}" == "$token" ]; then token="${token}:"; fi
57+ domain="${token}@${domain}"
5158 fi
52- testspace config url "${token}@${domain}"
59+ testspace config url "${domain}" ${{ inputs.config-args }}
5360 shell: bash
0 commit comments