Skip to content

Weekly email service #83

Weekly email service

Weekly email service #83

Workflow file for this run

name: Weekly email service
on:
schedule:
- cron: '0 20 * * 2' # UTC | Runs “At 7am on Wednesday.” UTC+11 | https://crontab.guru
workflow_dispatch:
inputs:
dry_run:
default: true
description: "Do not send emails"
type: boolean
env:
timezone: 'Australia/Melbourne'
TZ: 'Australia/Melbourne'
jobs:
github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: pip install .
- name: Place shopping list
run: |
echo '${{ secrets.SHOPPING_LIST }}' >> shopping-list.json
- name: Email comparisons
env:
MAILERSEND_API_KEY: ${{ secrets.MAILERSEND_API_KEY }}
FROM_ADDRESS: no-reply@${{ secrets.DOMAIN }}
run: |
python coles_vs_woolies email shopping-list.json --verbose \
${{ (github.event_name == 'workflow_dispatch' && inputs.dry_run) && '--dry_run' || '' }}