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 00000000000000..18a474f7e1ce60 --- /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) }}" + }