summaryrefslogtreecommitdiff
path: root/.github/workflows/trigger-pr.yml
blob: 41347eacf6e9ca937270cd47592d28a656a2be90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
name: Trigger PR
on:
  pull_request_target:
    types:
      - closed
    branches:
      - current
 
jobs:
  trigger-repo-sync:
    if: github.event.pull_request.merged == true
    runs-on: ubuntu-latest
    steps:
      - name: Trigger PR
        shell: bash
        run: |
          curl -X POST \
            -H "Accept: application/vnd.github.everest-preview+json" \
            -H "Authorization: Bearer ${{ secrets.PAT }}" \
            https://api.github.com/repos/${{ secrets.REMOTE_OWNER }}/${{ secrets.REMOTE_REPO }}/actions/workflows/create-pr.yml/dispatches \
            -d '{"ref": "git-actions", "inputs":{"pr_number":"${{ github.event.pull_request.number }}", "pr_source_branch": "current", "pr_target_branch": "circinus", "pr_message":"${{ github.event.pull_request.title }}", "pr_source_repo":"${{ github.repository }}" }}'