Files
zipair-monitor/.gitea/workflows/zipair-monitor.yml
isky 889da03dc8 feat: initial ZIPAIR Singapore sale monitor
Polls ZIPAIR sitemap every 10 min via Gitea Actions, detects new
Singapore/winter notifications, and fires an ntfy push alert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 15:57:00 +08:00

42 lines
1.2 KiB
YAML

name: ZIPAIR Singapore Sale Monitor
on:
schedule:
# Runs every 10 minutes (cron is UTC)
- cron: '*/10 * * * *'
workflow_dispatch: # allow manual trigger from Gitea UI
jobs:
check:
runs-on: ubuntu-latest # or your self-hosted runner label
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
# Need write access to commit state file back
token: ${{ secrets.GITEA_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# No pip deps needed — script uses stdlib only
- name: Run ZIPAIR monitor
env:
NTFY_URL: ${{ secrets.NTFY_URL }}
NTFY_TOKEN: ${{ secrets.NTFY_TOKEN }}
STATE_FILE: last_seen.txt
run: python check_zipair.py
- name: Commit updated state
run: |
git config user.name "zipair-bot"
git config user.email "zipair-bot@localhost"
git add last_seen.txt
# Only commit if the file actually changed
git diff --cached --quiet || git commit -m "chore: update last_seen to $(cat last_seen.txt)"
git push