Send_Automated_Email #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |