Skip to content

Scheduled JSON Updates #1281

Scheduled JSON Updates

Scheduled JSON Updates #1281

name: 'Scheduled JSON Updates'
on:
schedule:
- cron: '0 22 * * *'
concurrency: scheduled_update
jobs:
trigger-updates-json:
# For this job to work, the following secrets must be set:
# SITE_DISPATCH_ACCESS_TOKEN
name: 'Trigger Info Update'
runs-on: ubuntu-latest
if: (github.repository == 'Warzone2100/update-data')
steps:
- name: 'Trigger scheduled data update'
run: |
curl -X POST https://api.github.com/repos/Warzone2100/update-data/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.WZ2100_UPDATES_PUSH_TOKEN }} \
--data '{"event_type": "scheduled_update", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'