Skip to content

Commit fbcdc51

Browse files
debug logging
1 parent 51ad295 commit fbcdc51

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/scripts/dispatch_internal_repo_workflow.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,25 @@ echo "[INFO] Triggering workflow '$targetWorkflow' in nhs-notify-internal..."
279279

280280
echo "[DEBUG] Dispatch event payload: $DISPATCH_EVENT"
281281

282-
trigger_response=$(curl -s -L \
282+
echo " curl -s -L \
283283
--fail \
284284
-X POST \
285+
-H \"Accept: application/vnd.github+json\" \
286+
-H \"Authorization: Bearer ${PR_TRIGGER_PAT}\" \
287+
-H \"X-GitHub-Api-Version: 2022-11-28\" \
288+
\"https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/workflows/$targetWorkflow/dispatches\" \
289+
-d \"$DISPATCH_EVENT\""
290+
291+
trigger_response=$(curl -s -L \
292+
--fail-with-body \
293+
-X POST \
285294
-H "Accept: application/vnd.github+json" \
286295
-H "Authorization: Bearer ${PR_TRIGGER_PAT}" \
287296
-H "X-GitHub-Api-Version: 2022-11-28" \
288297
"https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/workflows/$targetWorkflow/dispatches" \
289298
-d "$DISPATCH_EVENT" 2>&1)
290299

300+
echo "[DEBUG] Response: $trigger_response"
291301
if [[ $? -ne 0 ]]; then
292302
echo "[ERROR] Failed to trigger workflow. Response: $trigger_response"
293303
exit 1

0 commit comments

Comments
 (0)