-
Notifications
You must be signed in to change notification settings - Fork 870
44 lines (39 loc) · 1.3 KB
/
early-warning.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Early Warning Notifier
on:
push:
branches: master
release:
types: [published]
schedule:
- cron: "0 0 * * *"
jobs:
sanity-check:
runs-on: ubuntu-latest
name: Sanity Check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Setup environment
run: pip install -r requirements.txt
- name: Perform check
run: python -m howdoi --sanity-check --explain
- name: Notify if check does not pass
if: ${{ failure() }}
uses: dawidd6/action-send-mail@v2
with:
# mail server settings
server_address: ${{ secrets.EMAIL_SERVER_ADDRESS }}
server_port: ${{ secrets.EMAIL_SERVER_PORT }}
# user credentials
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has status ${{ job.status }}
# comma-separated string, send email to
# from email name
from: Howdoi Early Warning System