Skip to content

Commit 537d038

Browse files
authored
Add pr dispatch (#2)
1 parent 16676fd commit 537d038

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Dispatch PR Events to Out-of-tree TestInfra
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
dispatch-event:
8+
if: github.repository_owner == 'pytorch'
9+
name: Dispatch events to the out-of-tree test infra repo
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Create a repository dispatch event
16+
uses: peter-evans/repository-dispatch@v3
17+
with:
18+
token: ${{ secrets.COSDT_BOT_TOKEN }}
19+
repository: cosdt/pytorch-integration-tests
20+
event-type: pytorch-event
21+
client-payload: |-
22+
{
23+
"owner": "${{ github.repository_owner }}",
24+
"repo": "${{ github.repository }}",
25+
"event_name": "${{ github.event_name }}",
26+
"pull_request": "${{ toJson(github.event.pull_request) }}"
27+
}

0 commit comments

Comments
 (0)