Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ name: canary
on:
schedule:
- cron: "17 19 * * *" # 05:17 Australian eastern time, off-peak
# Mondays: the same jobs, WITH the paid secrets (proxy, Scraping Browser,
# captcha key). On the daily run above those secrets read as empty, so
# it takes the free no-secret route and bills nothing.
- cron: "17 19 * * 1"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -68,7 +72,7 @@ jobs:
- name: Run the canary
id: run
env:
WOOLWORTHS_PROXY: ${{ secrets.WOOLWORTHS_PROXY }}
WOOLWORTHS_PROXY: ${{ (github.event_name != 'schedule' || github.event.schedule == '17 19 * * 1') && secrets.WOOLWORTHS_PROXY || '' }}
run: |
# set +e: GitHub runs `run:` under `bash -e`, so a non-zero exit
# would abort the step BEFORE the exit code could be captured, and
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ rather than leaving anyone to discover it from their own output.

## [Unreleased]

### Changed

- CI only: the canary's optional paid secret `WOOLWORTHS_PROXY` now reaches it only on a new weekly
run (Mondays 19:17 UTC) and on a manual dispatch. The daily run keeps its
schedule and takes the free route without them, so it bills nothing.

## [0.5.1] — 2026-10-16

> **Behaviour change.** `--allow-empty` now writes an empty file only for a
Expand Down
8 changes: 6 additions & 2 deletions smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1551,8 +1551,12 @@ def test_the_canary_is_not_gated_on_a_credential():
for step in ("Run the canary", "Assert what the run actually produced"):
assert f"name: {step}" in wf, f"the canary lost its {step!r} step"
# A proxy secret, where one IS set, must still reach the run — and still
# through the environment rather than a command line.
assert "WOOLWORTHS_PROXY: ${{ secrets.WOOLWORTHS_PROXY }}" in wf, (
# through the environment rather than a command line. It is a paid route,
# so it reaches the run on the weekly (Monday) schedule and on a manual
# dispatch only; the daily run reads it empty and runs without it.
assert ("WOOLWORTHS_PROXY: ${{ (github.event_name != 'schedule' || "
"github.event.schedule == '17 19 * * 1') && "
"secrets.WOOLWORTHS_PROXY || '' }}") in wf, (
"a proxy secret would no longer be used even if set")
assert "--proxy " not in wf, "a credential must not reach a command line"

Expand Down
Loading