File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -152,4 +152,28 @@ gh workflow run release.yaml \
152
152
-F snapshot=false \
153
153
" ${args[@]} "
154
154
155
- log " Release process started, you can watch the release via: gh run watch --exit-status <run-id>"
155
+ read -p " Watch release? (y/n)" -n 1 -r watch
156
+ if ! [[ $watch =~ ^[Yy]$ ]]; then
157
+ exit 0
158
+ fi
159
+
160
+ log ' Waiting for job to become "in_progress"...'
161
+
162
+ # Wait at most 3 minutes (3*60)/3 = 60 for the job to start.
163
+ for _ in $( seq 1 60) ; do
164
+ mapfile -t run < <(
165
+ # 3886828508 in_progress
166
+ gh run list -w release.yaml \
167
+ --limit 1 \
168
+ --json status,databaseId \
169
+ --jq ' .[] | (.databaseId | tostring) + " " + .status'
170
+ )
171
+ if [[ ${run[1]} != " in_progress" ]]; then
172
+ sleep 3
173
+ continue
174
+ fi
175
+ gh run watch --exit-status " ${run[0]} "
176
+ exit 0
177
+ done
178
+
179
+ error " Waiting for job to start timed out."
You can’t perform that action at this time.
0 commit comments