File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - main
77
8+ permissions :
9+ contents : read
10+ actions : none
11+ checks : none
12+ deployments : none
13+ issues : none
14+ discussions : none
15+ packages : none
16+ pull-requests : none
17+ repository-projects : none
18+ security-events : none
19+ statuses : none
20+
821jobs :
922 call-webhooks :
1023 runs-on : ubuntu-latest
1629 if [ -n "$WEBHOOK_URLS" ]; then
1730 IFS=',' read -ra URLS <<< "$WEBHOOK_URLS"
1831 for url in "${URLS[@]}"; do
19- curl -X POST "$url"
32+ if [[ "$url" =~ ^https:// ]]; then
33+ if ! curl -f --max-time 30 --retry 3 -X POST "$url"; then
34+ echo "Webhook call failed for: $url" >&2
35+ echo "Skipping invalid webhook URL (must start with https://): $url" >&2
36+ exit 1
37+ else
38+ echo "Skipping invalid webhook URL (must start with https://): $url" >&2
39+ fi
2040 done
2141 else
2242 echo "No webhooks to call."
You can’t perform that action at this time.
0 commit comments