name: Notify Codegineer repo

on:
  push:
    branches:
      - main

jobs:
  notify:
    name: Notify
    runs-on: ubuntu-latest
    steps:
      - name: Notify main repo
        run: |
          curl -X POST https://api.github.com/repos/Patacode/codegineer/dispatches \
            -H "Accept: application/vnd.github+json" \
            -H "Authorization: token ${{ secrets.MAIN_REPO_PAT }}" \
            -d '{"event_type":"sync-submodule","client_payload":{"submodule":"dofus-dmg-calculator"}}'
