-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (35 loc) · 1.07 KB
/
run.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: 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' || '' }}