From 5403f3aafc6f7d8a0d452c9b852b8550c87f3197 Mon Sep 17 00:00:00 2001 From: Wannes Gennar Date: Sun, 5 Jul 2026 23:15:05 +0200 Subject: [PATCH] feat: auto-update API when JSON updates --- .github/workflows/update-api.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/update-api.yml diff --git a/.github/workflows/update-api.yml b/.github/workflows/update-api.yml new file mode 100644 index 0000000..80ac46f --- /dev/null +++ b/.github/workflows/update-api.yml @@ -0,0 +1,19 @@ +name: Notify API repo of data update + +on: + push: + branches: [master] + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Trigger update in API repo + env: + GH_TOKEN: ${{ secrets.API_DISPATCH_TOKEN }} + run: | + curl -sSf -X POST \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/helldivers-2/api/dispatches \ + -d '{"event_type":"json-data-updated","client_payload":{"sha":"${{ github.sha }}"}}' \ No newline at end of file