File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -107,15 +107,19 @@ jobs:
107107 -H "X-GitHub-Api-Version: 2022-11-28" \
108108 "https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/runs?event=workflow_dispatch" \
109109 | jq -r --arg callerRunId "$callerRunId" \
110+ --arg targetWorkflow "${{ inputs.targetWorkflow }}" \
110111 '.workflow_runs[]
111- | select(.name
112- | contains("caller:" + $callerRunId) and
113- contains("'${{ inputs.targetEnvironment }}'") and
114- contains("'${{ inputs.targetAccountGroup }}'") and
115- contains("'${{ inputs.targetComponent }}'") and
116- contains("'${{ inputs.terraformAction }}'"))
117- | select(.path == ".github/workflows/'${{ inputs.targetWorkflow }}'")
118- | .url')
112+ | select(.path == ".github/workflows/" + $targetWorkflow)
113+ | select(.name
114+ | contains("'${{ inputs.targetEnvironment }}'") and
115+ contains("'${{ inputs.targetAccountGroup }}'") and
116+ contains("'${{ inputs.targetComponent }}'") and
117+ contains("'${{ inputs.terraformAction }}'"))
118+ | if ($targetWorkflow | test("dispatch-(acceptance|contextual|product|security)-tests-.*.yaml"))
119+ then select(.name | contains("caller:" + $callerRunId))
120+ else .
121+ end
122+ | .url')
119123
120124 if [[ -n "$workflow_run_url" && "$workflow_run_url" != null ]]; then
121125 ui_url=${workflow_run_url/api./}
You can’t perform that action at this time.
0 commit comments