Dispatch PyTorch PR events on schedule #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Dispatch PR events' | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/per-pr.yml' | |
- '.github/actions/list-pr/**' | |
- '!**/*.md' | |
schedule: | |
- cron: '0 12 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
list-pr: | |
name: List PyTorch pull requests | |
runs-on: ubuntu-latest | |
outputs: | |
prs: ${{ steps.list-pr.outputs.prs }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# List PRs created in the past 24 hours | |
- name: List PyTorch PRs | |
id: list-pr | |
uses: ./.github/actions/list-pr | |
with: | |
token: ${{ secrets.COSDT_BOT_TOKEN }} | |
owner: pytorch | |
repository: pytorch | |
hours: 24 | |
dispatch-pr: | |
name: 'Dispatch PR event - #${{ matrix.pr.number }}' | |
runs-on: ubuntu-latest | |
needs: | |
- list-pr | |
strategy: | |
matrix: | |
pr: ${{ fromJson(needs.list-pr.outputs.prs) }} | |
steps: | |
- name: Print pull request info | |
run: | | |
echo ${{ matrix.pr }} | |
- name: Dispatch PR events to be out-of-tree test infra | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.COSDT_BOT_TOKEN }} | |
repository: cosdt/pytorch-integration-tests | |
event-type: pytorch-pr-event | |
client-payload: |- | |
{ | |
"pull_request": { | |
number: ${{ matrix.pr.number }} | |
} | |
} |