name: Dispatch AMMR update triggers

on:
  push:
    branches: [master]

jobs:
  update:
    if: github.repository == 'anybody/ammr'
    runs-on: ubuntu-latest

    steps:
      - name: Trigger private fork updates
        uses: peter-evans/repository-dispatch@v3
        with:
          token: ${{ secrets.WORKFLOW_BOT_TOKEN }}
          repository: AnyBody/workflow-bot
          event-type: ammr-updated
          client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
