Changing the log messages
This commit is contained in:
parent
dfe9090923
commit
b8b3d2e933
11
.github/workflows/webhook-caller.yml
vendored
11
.github/workflows/webhook-caller.yml
vendored
@ -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
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Skipping invalid webhook URL (must start with https://): $url" >&2
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Skipping invalid webhook URL (must start with https://): failed on url $idx" >&2
|
||||||
|
fi
|
||||||
|
idx=$((idx+1))
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "No webhooks to call."
|
echo "No webhooks to call."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user