File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,14 @@ workflow_run_url=$(curl -s -L \
176176 end
177177 | .url' )
178178
179-
180179 if [[ -n " $workflow_run_url " && " $workflow_run_url " != null ]]; then
181- # Get the latest GHA run of this combination of parameters
180+ # Workflow_run_url is a list of all workflows which were run for this combination of inputs, but are the API uri
181+ # take the first and strip it back to being an accessible url
182+ # Example https://api.github.com/repos/MyOrg/my-repo/actions/runs/12346789 becomes
183+ # becomes https://github.com/MyOrg/my-repo/actions/runs/12346789
182184 workflow_run_url=$( echo " $workflow_run_url " | head -n 1)
185+ workflow_run_url=${workflow_run_url/ api./ } # strips the api. prefix
186+ workflow_run_url=${workflow_run_url/ \/ repos/ } # strips the repos/ uri
183187 echo " [INFO] Found workflow run url: $workflow_run_url "
184188 break
185189 fi
191195if [[ -z " $workflow_run_url " || " $workflow_run_url " == null ]]; then
192196 echo " [ERROR] Failed to get the workflow run url. Exiting."
193197 exit 1
194- else
195- echo " [INFO] Found workflow run url: $workflow_run_url "
196198fi
197199
198200# Wait for workflow completion
You can’t perform that action at this time.
0 commit comments