File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -81,12 +81,20 @@ jobs:
8181 # Poll GitHub API to check the workflow status
8282 run_id=""
8383 for i in {1..12}; do
84- run_id =$(curl -s \
84+ in_progress =$(curl -s \
8585 -H "Accept: application/vnd.github+json" \
8686 -H "Authorization: Bearer ${{ secrets.PR_TRIGGER_PAT }}" \
8787 -H "X-GitHub-Api-Version: 2022-11-28" \
88- "https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/runs?event=workflow_dispatch&status=in_progress" \
89- | jq -r '.workflow_runs[0].id')
88+ "https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/runs?event=workflow_dispatch&status=in_progress")
89+
90+ run_id=$(echo "$in_progress" | jq -r \
91+ --arg env "${{ inputs.targetEnvironment }}" \
92+ --arg component "${{ inputs.targetComponent }}" \
93+ --arg repoName "nhs-notify-web-template-management" \
94+ --arg releaseVersion "${{ inputs.releaseVersion }}" \
95+ '.workflow_runs[]
96+ | select(.name | contains($env) and contains($component) and contains($repoName) and contains($releaseVersion))
97+ | .id' | head -n 1)
9098
9199 if [[ -n "$run_id" && "$run_id" != null ]]; then
92100 echo "Found workflow run with ID: $run_id"
You can’t perform that action at this time.
0 commit comments