mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27:52 +00:00
23 lines
667 B
YAML
23 lines
667 B
YAML
name: Nightly DTFB Player Sync
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *' # Every night at 2:00 AM UTC
|
|
workflow_dispatch: # Allow manual trigger from GitHub
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger DTFB Sync
|
|
run: |
|
|
response=$(curl -s -o /dev/null -w "%{http_code}" \
|
|
-X POST \
|
|
-H "Authorization: Bearer ${{ secrets.DTFB_SYNC_KEY }}" \
|
|
-H "Content-Type: application/json" \
|
|
"${{ secrets.DTFB_SYNC_TRIGGER_URL }}")
|
|
if [ "$response" != "200" ]; then
|
|
echo "Sync failed with HTTP $response"
|
|
exit 1
|
|
fi
|
|
echo "Sync triggered successfully"
|