-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.04 KB
/
Copy pathcheck.yml
File metadata and controls
43 lines (35 loc) · 1.04 KB
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
39
40
41
42
43
name: Snowy Owl Check
on:
schedule:
# hourly 6am-6pm EST (11-23 UTC), Oct-Apr only
- cron: "0 11-23 * 1-4 *"
- cron: "0 11-23 * 10-12 *"
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv sync
- name: Restore state cache
uses: actions/cache/restore@v4
with:
path: .snowy-state.json
key: snowy-state
restore-keys: snowy-state
- name: Check for new sightings
env:
EBIRD_API_KEY: ${{ secrets.EBIRD_API_KEY }}
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
RESEND_FROM: alerts@resend.dev
run: uv run snowy check --to "${{ secrets.EMAIL_TO }}"
- name: Delete old state cache
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh cache delete snowy-state || true
- name: Save state cache
uses: actions/cache/save@v4
with:
path: .snowy-state.json
key: snowy-state