From e8aef3cbafed7727bb7e6149014f11d6b4213dd7 Mon Sep 17 00:00:00 2001 From: jehrr <79864894+jehrr@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:35:05 +0000 Subject: [PATCH] Pass the canary's paid secrets only on a weekly run; the daily run stays free Paid canary paths (proxy, Scraping Browser, captcha) run weekly on Mondays; free paths keep their daily schedule. A manual dispatch runs everything. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01CKsd7q25N19WzUZjrAdzx8 --- .github/workflows/canary.yml | 12 ++++++++---- CHANGELOG.md | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 7b2ea46..16d3db1 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -27,6 +27,10 @@ on: # Once a day, off the hour, so it is not competing with everyone else's # on-the-hour cron jobs for runner availability. - cron: "37 7 * * *" + # 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: "37 7 * * 1" workflow_dispatch: jobs: @@ -36,8 +40,8 @@ jobs: # `secrets` is not available in a job-level `if`, so presence is tested # here, once, and read from each step's `if` and shell below. These are # the strings "true"/"false", never the secret itself. - HAVE_CDP: ${{ secrets.GIVENCHY_CDP_ENDPOINT != '' }} - HAVE_PROXY: ${{ secrets.GIVENCHY_PROXY != '' }} + HAVE_CDP: ${{ (github.event_name != 'schedule' || github.event.schedule == '37 7 * * 1') && secrets.GIVENCHY_CDP_ENDPOINT != '' }} + HAVE_PROXY: ${{ (github.event_name != 'schedule' || github.event.schedule == '37 7 * * 1') && secrets.GIVENCHY_PROXY != '' }} steps: - uses: actions/checkout@v4 @@ -75,8 +79,8 @@ jobs: # Through the environment, never argv (see the header). Unset # secrets arrive as "" and env_config.py treats that as unset, so # these lines are correct in both configurations. - GIVENCHY_CDP_ENDPOINT: ${{ secrets.GIVENCHY_CDP_ENDPOINT }} - GIVENCHY_PROXY: ${{ secrets.GIVENCHY_PROXY }} + GIVENCHY_CDP_ENDPOINT: ${{ (github.event_name != 'schedule' || github.event.schedule == '37 7 * * 1') && secrets.GIVENCHY_CDP_ENDPOINT || '' }} + GIVENCHY_PROXY: ${{ (github.event_name != 'schedule' || github.event.schedule == '37 7 * * 1') && secrets.GIVENCHY_PROXY || '' }} run: | set +e python3 playwright_scraper.py \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f2363..1718eac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ from a bill or an empty output file. ## [Unreleased] +### Changed + +- CI only: the canary's optional paid secrets `GIVENCHY_CDP_ENDPOINT`, `GIVENCHY_PROXY` now reach it only on a new weekly + run (Mondays 07:37 UTC) and on a manual dispatch. The daily run keeps its + schedule and takes the free route without them, so it bills nothing. + ## [1.1.0] — 2026-10-15 > **Behaviour changes for existing users (audit of 2026-10-14):**