Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notify when CI job fails #1547

Merged
merged 16 commits into from
Jan 28, 2025
35 changes: 35 additions & 0 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,38 @@ jobs:
upload-to-pypi: cu121
secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
notify:
runs-on: ubuntu-latest
name: Email notification
needs: [generate-matrix, build]
if: failure() && github.event_name == 'schedule'
steps:
- uses: dawidd6/action-send-mail@v4
with:
server_address: smtp.gmail.com
server_port: 465
username: torchao.notify
password: ${{ secrets.TORCHAO_NOTIFY_PASSWORD }}
from: [email protected]
to: ${{ secrets.TORCHAO_NOTIFY_RECIPIENT }}
subject: breakbutterflyScheduled Build Failure for TorchAO
body: |
Build Failure Notification for TorchAO

A failure occurred in the Build Linux Wheels workflow.

Run Details:
- Workflow: ${{ github.workflow }}
- Run Type: ${{ github.event_name }}
- Repository: ${{ github.repository }}
- Branch/PR: ${{ github.ref }}
- Commit: ${{ github.sha }}

You can view the full run details here:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

Error Information:
${{ needs.generate-matrix.result == 'failure' && 'Matrix generation failed' || '' }}
${{ needs.build.result == 'failure' && 'Build job failed' || '' }}

This is an automated notification. Please check the GitHub Actions page for more details about the failure.
Loading