File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 8585 )
8686 }')
8787
88- # Trigger The workflow
88+ # Trigger the workflow
8989 curl -L \
9090 --fail \
9191 --silent \
@@ -114,7 +114,7 @@ jobs:
114114 --arg targetAccountGroup "${{ inputs.targetAccountGroup }}" \
115115 --arg targetComponent "${{ inputs.targetComponent }}" \
116116 --arg terraformAction "${{ inputs.terraformAction }}" \
117- '.workflow_runs[]
117+ '[ .workflow_runs[]
118118 | select(.path == ".github/workflows/" + $targetWorkflow)
119119 | select(.name
120120 | contains($targetEnvironment)
@@ -126,7 +126,7 @@ jobs:
126126 then select(.name | contains("caller:" + $callerRunId))
127127 else .
128128 end
129- | .url')
129+ ] | sort_by(.id) | last | .url')
130130
131131 if [[ -n "$workflow_run_url" && "$workflow_run_url" != null ]]; then
132132 ui_url=${workflow_run_url/api./}
@@ -157,6 +157,12 @@ jobs:
157157 conclusion=$(echo "$response" | jq -r '.conclusion')
158158
159159 if [ "$status" == "completed" ]; then
160+ if [ -z "$conclusion" ] || [ "$conclusion" == "null" ]; then
161+ echo "Workflow marked completed but conclusion not yet available, retrying..."
162+ sleep 5
163+ continue
164+ fi
165+
160166 if [ "$conclusion" == "success" ]; then
161167 echo "Workflow completed successfully."
162168 exit 0
You can’t perform that action at this time.
0 commit comments