Skip to content

Commit 37608d1

Browse files
committed
Restore notify workflow
2 parents 04e2a28 + 0a95a98 commit 37608d1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/notify.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Notify about failed build
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Tests"]
6+
types: [completed]
7+
8+
jobs:
9+
notify:
10+
name: 📣 Notify community on failure
11+
if: ${{ github.event_name == 'schedule' && github.event.workflow_run.conclusion == 'failure' }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Send email on failure
15+
if: ${{ github.event_name == 'schedule' && github.event.workflow_run.conclusion == 'failure' }}
16+
uses: dawidd6/action-send-mail@v2
17+
with:
18+
server_address: ${{ secrets.SMTP_SERVER }}
19+
server_port: ${{ secrets.SMTP_PORT }}
20+
username: ${{ secrets.SMTP_USERNAME }}
21+
password: ${{ secrets.SMTP_PASSWORD }}
22+
subject: GitHub Actions failed for ${{ github.repository }}
23+
body: Build job of ${{ github.repository }} failed! See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} for more information.
24+
to: ${{ secrets.MAIL_RECEIVER }}
25+
from: GitHub Actions

0 commit comments

Comments
 (0)