name: Dispatch permissions: contents: write on: pull_request_target: types: [opened, synchronize, reopened] push: jobs: dispatch: name: Dispatch runs-on: ubuntu-latest steps: - name: Repository Dispatch uses: peter-evans/repository-dispatch@v3 with: event-type: "${{ github.event_name == 'push' && 'version-push' || 'version-pr' }}" client-payload: > { "actor": "${{ github.event.pull_request.user.login || github.actor }}", "pr_number": "${{ github.event.number }}", "head_ref": "${{ github.head_ref || github.ref }}", "head_sha": "${{ github.event.pull_request.head.sha || github.sha }}", "base_ref": "${{ github.ref_name }}" }