2024-01-28 07:48:06 +08:00
|
|
|
# yamllint disable rule:line-length
|
2023-06-05 21:48:20 +08:00
|
|
|
name: RollPyTorch Merge
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: [Build and Test]
|
|
|
|
types: [completed]
|
|
|
|
branches: [rollpytorch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
merge-pr:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: |
|
|
|
|
github.repository == 'llvm/torch-mlir' &&
|
2023-09-08 20:00:09 +08:00
|
|
|
github.event.workflow_run.actor.login == 'stellaraccident' &&
|
2023-06-05 21:48:20 +08:00
|
|
|
github.event.workflow_run.conclusion == 'success'
|
|
|
|
|
|
|
|
steps:
|
2024-01-28 07:48:06 +08:00
|
|
|
# Fetch the repo first so that the gh command knows where to look for the PR
|
|
|
|
- name: Fetch Repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }}
|
2023-06-10 10:50:19 +08:00
|
|
|
|
2024-01-28 07:48:06 +08:00
|
|
|
- name: Merge RollPyTorch PR
|
|
|
|
run: |
|
|
|
|
for pr_id in ${{ join(github.event.workflow_run.pull_requests.*.number, ' ') }}
|
|
|
|
do
|
|
|
|
echo "Merging PR: $pr_id"
|
|
|
|
gh pr merge $pr_id --delete-branch --squash
|
|
|
|
done
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.ROLLPYTORCH_TOKEN1 }}
|