From 717d353713ccbf2bcd202b7c34fafab9aa15b14f Mon Sep 17 00:00:00 2001 From: venkatap Date: Wed, 15 Nov 2023 19:24:45 -0800 Subject: [PATCH 1/2] Adding the workflow --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From fe5257b558d71452dec47d473f778da2694c35d2 Mon Sep 17 00:00:00 2001 From: venkatap Date: Wed, 15 Nov 2023 19:26:10 -0800 Subject: [PATCH 2/2] Adding the workflow --- .github/workflows/call-mirror.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/call-mirror.yaml 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 }}" }}'