name: Integration Test Trigger
on:
  pull_request:
    types: [closed]
jobs:
  merge-PR:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - name: Trigger integration tests on highfive-devs/bbp-integration
        run: |
          curl -X POST https://api.github.com/repos/highfive-devs/bbp-integration/dispatches \
          -H 'Accept: application/vnd.github.everest-preview+json' \
          -u ${{ secrets.ACCESS_TOKEN }} \
          --data '{"event_type": "merge", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'
