ci: post comment on RollPyTorch tracker issue upon build failure (#1730)

Now that the RollPyTorch tracker issue exists, we can automate the job
of notifying folks of failures instead of having to do it manually.
This patch adds a step to the workflow to post such a message.
pull/1725/head snapshot-20221219.692
Ashay Rane 2022-12-18 13:45:30 -06:00 committed by GitHub
parent 335cfe9134
commit f6b6069a34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -59,6 +59,7 @@ jobs:
# retrieve them when creating a PR
echo "PT_HASH=${PT_HASH}" >> ${GITHUB_ENV}
echo "PT_RELEASE=${PT_RELEASE}" >> ${GITHUB_ENV}
echo "PTVISION_RELEASE=${VISION_RELEASE}" >> ${GITHUB_ENV}
echo "PT_HASH_CHANGED=${PT_HASH_CHANGED}" >> ${GITHUB_ENV}
- name: Build and test (in-tree), also update ODS and abstract interpretation library
@ -71,6 +72,21 @@ jobs:
TM_UPDATE_ODS_AND_ABSTRACT_INTERP_LIB="ON" \
./build_tools/python_deploy/build_linux_packages.sh
- name: Post issue comment on build failure
if: failure()
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: 1690
body: |
The RollPyTorch action has failed. See [CI log](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
The following information may come handy when fixing the code.
```
torch version: ${{ env.PT_RELEASE }}
torch commit hash: ${{ env.PT_HASH }}
torchvision version: ${{ env.PTVISION_RELEASE }}
```
- name: Push changes to main branch
if: env.PT_HASH_CHANGED != '0'
run: |