-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.35 KB
/
Email_Notification_on_Completed_Forecasts.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
name: Send_Automated_Email
on:
workflow_run:
workflows: ["Generate_RespiCast_Forecasts"] # Trigger when this workflow finishes
types:
- completed
# Or you can manually trigger the workflow
workflow_dispatch:
jobs:
send_email_job:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository to access the files
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Prepare the email content and attach files
- name: Send email via gmail
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com # gmail SMTP server
server_port: 587 # Port for TLS
username: ${{ secrets.GMAIL_EMAIL }}
password: ${{ secrets.GMAIL_APP_PASSWORD }}
subject: RespiCast Forecast Workflow Completed
body: Test test
to: [email protected] # Replace with the recipient's email address
#from: ${{ secrets.GMAIL_EMAIL }}
from: [email protected]
secure: false
attachments: |
./models/Forecasting-hubs_models/model_output/model_output/figures/2024-12-04-ECDC-soca_simplex_ILI.jpg
./models/Forecasting-hubs_models/model_output/model_output/figures/2024-12-04-ECDC-soca_simplex_ARI.jpg
./models/Forecasting-hubs_models/model_output/model_output/figures/2024-12-04-ECDC-soca_simplex_hosp.jpg