Skip to content

Commit

Permalink
Send email on github actions CI test job failures
Browse files Browse the repository at this point in the history
  • Loading branch information
manicki committed Sep 12, 2024
1 parent 0d8db56 commit dc3b2b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@ jobs:
run: composer install --prefer-source --no-progress
- name: Run test suite
run: composer run-script ci
- name: Send mail on failure
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.CI_MAIL_USERNAME}}
password: ${{secrets.CI_MAIL_PASSWORD}}
to: [email protected]
from: ${{ github.repository }} CI
subject: CI job failed for ${{ github.repository }}
html_body: |
CI workflow ${{ github.workflow }} failed!
The failed job can be found in <a href="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}">here</a>

0 comments on commit dc3b2b9

Please sign in to comment.