Send Email Notification #81
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 Email Notification | |
on: | |
schedule: | |
- cron: '0 7 * * *' # 9 AM CET | |
workflow_dispatch: # also enable on button click | |
jobs: | |
send_email: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Send email | |
env: | |
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | |
FROM_EMAIL: ${{ secrets.FROM_EMAIL }} | |
TO_EMAIL: ${{ secrets.TO_EMAIL }} | |
IGNORE_DOMAINS: ${{ env.IGNORE_DOMAINS }} | |
run: python script.py |