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