Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/build-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,29 @@ jobs:
GIT_USER_EMAIL: info@openmrs.org
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_REPO_USERNAME }}
MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_REPO_API_KEY }}

notify:
name: Notify on failure
needs: [build, deploy, release]
if: always() && contains(needs.*.result, 'failure')
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Send failure email
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.SMTP_SERVER }}
server_port: ${{ secrets.SMTP_PORT }}
username: ${{ secrets.SMTP_USERNAME }}
password: ${{ secrets.SMTP_PASSWORD }}
subject: "[${{ github.repository }}] Workflow failed: ${{ github.workflow }} (#${{ github.run_number }})"
to: dev-refapp@openmrs.org
from: openmrs-ci@openmrs.org
body: |
Workflow "${{ github.workflow }}" failed in ${{ github.repository }}.

Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }}
Triggered by: ${{ github.actor }}

View the run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}