Files
com_sportsmanager/.github/workflows/sync-dtfb-nightly.yml
T
2026-06-03 18:36:39 +02:00

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"