mirror of https://github.com/llvm/torch-mlir
build: use Github Actions for creating PR (#1433)
parent
bce00c8ed1
commit
8f608c048d
|
@ -1,7 +1,6 @@
|
||||||
name: Roll PyTorch
|
name: Roll PyTorch
|
||||||
|
|
||||||
on:
|
on: workflow_dispatch
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_linux:
|
build_linux:
|
||||||
|
@ -41,25 +40,22 @@ jobs:
|
||||||
TORCH_MLIR_SRC_PYTORCH_BRANCH="${{ env.PT_HASH }}" \
|
TORCH_MLIR_SRC_PYTORCH_BRANCH="${{ env.PT_HASH }}" \
|
||||||
TORCH_MLIR_SRC_PYTORCH_RELEASE="${{ env.PT_RELEASE }}" \
|
TORCH_MLIR_SRC_PYTORCH_RELEASE="${{ env.PT_RELEASE }}" \
|
||||||
./build_tools/python_deploy/build_linux_packages.sh
|
./build_tools/python_deploy/build_linux_packages.sh
|
||||||
- name: Push changes to new branch
|
|
||||||
run: |
|
|
||||||
BRANCH="merge/pytorch-update-${{ env.PT_RELEASE }}"
|
|
||||||
TITLE="update PyTorch version to ${{ env.PT_RELEASE }}"
|
|
||||||
echo "BRANCH=${BRANCH}" >> ${GITHUB_ENV}
|
|
||||||
echo "TITLE=${TITLE}" >> ${GITHUB_ENV}
|
|
||||||
cd ${GITHUB_WORKSPACE}
|
|
||||||
git config user.email "torch-mlir@users.noreply.github.com"
|
|
||||||
git config user.name "Roll PyTorch Action"
|
|
||||||
git checkout -b "${BRANCH}"
|
|
||||||
git add pytorch-version.txt pytorch-requirements.txt
|
|
||||||
git commit -m "${TITLE}"
|
|
||||||
git push --set-upstream origin "${BRANCH}"
|
|
||||||
- name: Create PR to push new PyTorch version
|
- name: Create PR to push new PyTorch version
|
||||||
run: |
|
uses: peter-evans/create-pull-request@v4
|
||||||
URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
with:
|
||||||
BODY="PyTorch commit hash: \`${{ env.PT_HASH }}\` -- CI link: ${URL}"
|
token: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }}
|
||||||
cd ${GITHUB_WORKSPACE}
|
add-paths: |
|
||||||
gh pr create -H "${{ env.BRANCH }}" -B main --title "${{ env.TITLE }}" \
|
pytorch-version.txt
|
||||||
--body "${BODY}" --reviewer powderluv
|
pytorch-requirements.txt
|
||||||
env:
|
delete-branch: true
|
||||||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_INVOCATION_TOKEN }}
|
branch: ${{ env.BRANCH }}
|
||||||
|
title: ${{ env.TITLE }}
|
||||||
|
author: Roll PyTorch Action <torch-mlir@users.noreply.github.com>
|
||||||
|
body: |
|
||||||
|
PyTorch commit hash `${{ env.PT_HASH }}`
|
||||||
|
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
commit-message: |
|
||||||
|
${{ env.TITLE }}
|
||||||
|
|
||||||
|
PyTorch commit hash `${{ env.PT_HASH }}`
|
||||||
|
reviewers: powderluv
|
||||||
|
|
Loading…
Reference in New Issue