Changing the log messages

This commit is contained in:
Aaron Powell 2025-07-11 11:16:43 +10:00
parent dfe9090923
commit b8b3d2e933

View File

@ -28,15 +28,16 @@ jobs:
run: | run: |
if [ -n "$WEBHOOK_URLS" ]; then if [ -n "$WEBHOOK_URLS" ]; then
IFS=',' read -ra URLS <<< "$WEBHOOK_URLS" IFS=',' read -ra URLS <<< "$WEBHOOK_URLS"
idx=1
for url in "${URLS[@]}"; do for url in "${URLS[@]}"; do
if [[ "$url" =~ ^https:// ]]; then if [[ "$url" =~ ^https:// ]]; then
if ! curl -f --max-time 30 --retry 3 -X POST "$url"; then if ! curl -f --max-time 30 --retry 3 -X POST "$url"; then
echo "Webhook call failed for: $url" >&2 echo "Webhook call failed on url $idx" >&2
echo "Skipping invalid webhook URL (must start with https://): $url" >&2 fi
exit 1
else else
echo "Skipping invalid webhook URL (must start with https://): $url" >&2 echo "Skipping invalid webhook URL (must start with https://): failed on url $idx" >&2
fi fi
idx=$((idx+1))
done done
else else
echo "No webhooks to call." echo "No webhooks to call."