feat: added the email notification for job failures (#27508)

This commit is contained in:
Aarif
2021-05-04 18:23:21 +05:00
committed by GitHub
parent 033b9474ac
commit b97d283fda

View File

@@ -13,7 +13,7 @@ on:
jobs:
upgrade_requirements:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
@@ -56,3 +56,16 @@ jobs:
--commit-message="chore: Updating Python Requirements" --pr-title="Python Requirements Update" \
--pr-body="Python requirements update.Please review the [changelogs](https://openedx.atlassian.net/wiki/spaces/TE/pages/1001521320/Python+Package+Changelogs) for the upgraded packages." \
--user-reviewers="" --team-reviewers="arbi-bom" --delete-old-pull-requests
- name: Send failure notification
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: email-smtp.us-east-1.amazonaws.com
server_port: 465
username: ${{secrets.EDX_SMTP_USERNAME}}
password: ${{secrets.EDX_SMTP_PASSWORD}}
subject: Upgrade python requirements workflow failed in ${{github.repository}}
to: arbi-bom@edx.org
from: github-actions <github-actions@edx.org>
body: Upgrade python requirements workflow in ${{github.repository}} failed! For details see "github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"