diff --git a/.github/workflows/call-mirror.yaml b/.github/workflows/call-mirror.yaml new file mode 100644 index 0000000..ba68f83 --- /dev/null +++ b/.github/workflows/call-mirror.yaml @@ -0,0 +1,18 @@ +name: repository-dispatch-test + +on: + pull_request_target: + types: [opened, edited, synchronize] + +jobs: + run-repository-dispatch: + runs-on: self-hosted + steps: + - name: Trigger Workflow + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.CI_DOMAIN_TOKEN }}" \ + "https://${{ secrets.CI_DOMAIN_URL }}/api/v3/repos/${{ secrets.CI_DOMAIN_OWNER }}/${{ secrets.CI_DOMAIN_REPO }}/actions/workflows/${{ secrets.CI_DOMAIN_WORKFLOW }}/dispatches" \ + -d '{"ref": "main", "inputs": { "branch_ref": "${{ github.event.pull_request.head.ref }}", "repo": "${{ github.event.pull_request.head.repo.full_name }}" }}' diff --git a/README.md b/README.md index d14b7ef..cfcbbba 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,4 @@ Testing the pull_request_target -Removing the call-mirror +adding the call-mirror