Skip to content

Commit 519ac1a

Browse files
authored
update client binary only if newer (#12)
1 parent dc3f0b9 commit 519ac1a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

action.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Testspace Setup CLI'
22
description: 'Setup Testspace client to publish CI results from workflow to Dashboard; report flaky tests, metrics, graphs, and analytics'
33
author: 'S2 Technologies, Inc.'
44
inputs:
5-
domain:
5+
domain:
66
description: 'Testspace domain name'
77
required: true
88
token:
@@ -13,26 +13,29 @@ branding:
1313
icon: terminal
1414
runs:
1515
using: 'composite'
16-
steps:
16+
steps:
1717
- run: |
1818
if [ `uname -m` != 'x86_64' ]; then echo 'Error: Not supported platform.' && exit 1; fi
1919
case `uname -s` in
2020
Linux)
2121
folder=$HOME/bin
2222
mkdir -p $folder
23-
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $folder
23+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $RUNNER_TEMP
24+
cp -f -p -u $RUNNER_TEMP/testspace $folder
2425
;;
2526
Darwin)
2627
folder=$HOME/bin
2728
mkdir -p $folder
28-
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $folder
29+
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $RUNNER_TEMP
30+
rsync -t -u $RUNNER_TEMP/testspace $folder
2931
;;
3032
*) # Windows
3133
folder=$LOCALAPPDATA\Programs\testspace
3234
mkdir -p "$folder"
3335
curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip
34-
unzip -q -o testspace-windows.zip -d "$folder"
36+
unzip -q -o testspace-windows.zip -d $RUNNER_TEMP
3537
rm testspace-windows.zip
38+
cp -f -p -u $RUNNER_TEMP/testspace.exe "$folder"
3639
;;
3740
esac
3841
echo "$folder" >> $GITHUB_PATH

0 commit comments

Comments
 (0)