Skip to content

Commit e151d6a

Browse files
authored
notify when CI job fails (#1547)
* test notify build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml * final commit * Update build_wheels_linux.yml * Update build_wheels_linux.yml * Update build_wheels_linux.yml
1 parent 13bd59e commit e151d6a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build_wheels_linux.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,38 @@ jobs:
5656
upload-to-pypi: cu121
5757
secrets:
5858
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
59+
notify:
60+
runs-on: ubuntu-latest
61+
name: Email notification
62+
needs: [generate-matrix, build]
63+
if: failure() && github.event_name == 'schedule'
64+
steps:
65+
- uses: dawidd6/action-send-mail@v4
66+
with:
67+
server_address: smtp.gmail.com
68+
server_port: 465
69+
username: torchao.notify
70+
password: ${{ secrets.TORCHAO_NOTIFY_PASSWORD }}
71+
from: torchao.notify@gmail.com
72+
to: ${{ secrets.TORCHAO_NOTIFY_RECIPIENT }}
73+
subject: breakbutterflyScheduled Build Failure for TorchAO
74+
body: |
75+
Build Failure Notification for TorchAO
76+
77+
A failure occurred in the Build Linux Wheels workflow.
78+
79+
Run Details:
80+
- Workflow: ${{ github.workflow }}
81+
- Run Type: ${{ github.event_name }}
82+
- Repository: ${{ github.repository }}
83+
- Branch/PR: ${{ github.ref }}
84+
- Commit: ${{ github.sha }}
85+
86+
You can view the full run details here:
87+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
88+
89+
Error Information:
90+
${{ needs.generate-matrix.result == 'failure' && 'Matrix generation failed' || '' }}
91+
${{ needs.build.result == 'failure' && 'Build job failed' || '' }}
92+
93+
This is an automated notification. Please check the GitHub Actions page for more details about the failure.

0 commit comments

Comments
 (0)