Adding an action to invoke webhooks

This will allow external tools to be notified when there are updates on the main branch so they can request the data from the repo
This commit is contained in:
Aaron Powell 2025-07-11 10:32:03 +10:00
parent 8a37c38789
commit 1f10b6532a

23
.github/workflows/webhook-caller.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Call Webhooks on Main Push
on:
push:
branches:
- main
jobs:
call-webhooks:
runs-on: ubuntu-latest
steps:
- name: Check and call webhooks
env:
WEBHOOK_URLS: ${{ secrets.WEBHOOK_URLS }}
run: |
if [ -n "$WEBHOOK_URLS" ]; then
IFS=',' read -ra URLS <<< "$WEBHOOK_URLS"
for url in "${URLS[@]}"; do
curl -X POST "$url"
done
else
echo "No webhooks to call."
fi