Skip to content

Commit

Permalink
Trying again
Browse files Browse the repository at this point in the history
  • Loading branch information
pv72895 committed Feb 14, 2024
1 parent 4d3639d commit 1d96b7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/scripts/upload_impacted_targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ else
num_impacted_targets=$(wc -l <"${IMPACTED_TARGETS_FILE}")
fi

RESPONSE_BODY_FILE="./response.txt"

HTTP_STATUS_CODE=$(
curl -s -o /dev/null -w '%{http_code}' -X POST \
curl -s -o "${RESPONSE_BODY_FILE}" -w '%{http_code}' -X POST \
-H "Content-Type: application/json" -H "x-api-token:${API_TOKEN-}" -H "x-forked-workflow-run-id:${RUN_ID-}" \
-d "@${POST_BODY}" \
"${API_URL}"
Expand All @@ -111,4 +113,10 @@ else
fi

echo "${COMMENT_TEXT}"

if [[ ${HTTP_STATUS_CODE} != 200 ]]; then
echo "Response Body:"
cat "${RESPONSE_BODY_FILE}"
fi

exit "${EXIT_CODE}"

0 comments on commit 1d96b7a

Please sign in to comment.