From 537d038d68f7d1543d5fc43aadd4d2600ab0e1af Mon Sep 17 00:00:00 2001 From: Yuanhao Ji Date: Wed, 4 Dec 2024 17:00:11 +0800 Subject: [PATCH] Add pr dispatch (#2) --- .github/workflows/out-of-tree-test-infra.yml | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/out-of-tree-test-infra.yml diff --git a/.github/workflows/out-of-tree-test-infra.yml b/.github/workflows/out-of-tree-test-infra.yml new file mode 100644 index 0000000000000..18a474f7e1ce6 --- /dev/null +++ b/.github/workflows/out-of-tree-test-infra.yml @@ -0,0 +1,27 @@ +name: Dispatch PR Events to Out-of-tree TestInfra + +on: + pull_request: + +jobs: + dispatch-event: + if: github.repository_owner == 'pytorch' + name: Dispatch events to the out-of-tree test infra repo + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create a repository dispatch event + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.COSDT_BOT_TOKEN }} + repository: cosdt/pytorch-integration-tests + event-type: pytorch-event + client-payload: |- + { + "owner": "${{ github.repository_owner }}", + "repo": "${{ github.repository }}", + "event_name": "${{ github.event_name }}", + "pull_request": "${{ toJson(github.event.pull_request) }}" + }