mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
Implement Player Sync to DTFB (#286)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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"
|
||||
Reference in New Issue
Block a user