File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 20
20
build-northstar :
21
21
runs-on : ubuntu-20.04
22
22
steps :
23
+ - name : Wait for launcher release build to be ready
24
+ timeout-minutes : 30 # Only wait for 30 minutes. If we take longer, something probably broke
25
+ run :
26
+ bash wait_dl.sh
23
27
- name : Download compiled launcher
24
28
run :
25
29
wget "https://github.com/R2Northstar/NorthstarLauncher/releases/download/${{ env.NORTHSTAR_VERSION }}/northstar-launcher.zip"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if contains command line arg
4
+ if [ -z " $1 " ]; then
5
+ echo " Missing command-line argument."
6
+ exit 1
7
+ fi
8
+
9
+ url=" https://github.com/R2Northstar/NorthstarLauncher/releases/tag/$1 "
10
+ wait_time_seconds=60
11
+
12
+ # Loop until the response code changes
13
+ while true ; do
14
+ response=$( curl --silent --output /dev/null --write-out " %{http_code}" $url )
15
+ if [ $response -ne 200 ]; then
16
+ echo " Response is not 200. Retrying in $wait_time_seconds seconds."
17
+ sleep $wait_time_seconds
18
+ else
19
+ echo " Site is accessible with response code $response ."
20
+ break
21
+ fi
22
+ done
23
+
24
+ # 10 second sleep just in case we hit some weird race condition
25
+ # where files are still being uploaded but release is done
26
+ sleep 10
You can’t perform that action at this time.
0 commit comments