Skip to content

Scheduled live-run workflow that skips when no API key secret is present #9

Description

@josharsh

CI (.github/workflows/check.yml) runs the fixture check on every push and PR. There is no scheduled live run, so a change in the model's behavior on these cases would go unnoticed.

Add a second workflow, live.yml, that:

  • runs on schedule (weekly is enough) and workflow_dispatch;
  • skips cleanly when the TYPESAFE_API_KEY secret is absent, so forks and PRs never fail on it (a job-level if on a secret is not allowed directly; the usual pattern is a first step that writes has_key=true/false to GITHUB_OUTPUT and gates the rest on it);
  • runs node src/cli.mjs run all --live --out reports/live-$(date -u +%F).json --check;
  • uploads the report as a workflow artifact with 30-day retention;
  • never commits the report to the repository;
  • pins actions by SHA, as check.yml does.

Mark the run as informational: a --check mismatch should fail the job so it is visible, but nothing else depends on it.

I will add the secret once the workflow is merged; you can verify the skip path from a fork and the run path by dry-running the step logic locally with the key unset.

Done when

  • The workflow exists, is SHA-pinned, and the skip path is shown working on a fork.

How to work on this

  1. Fork, then git clone and run npm run check (Node 20.17+, no install step, no API key needed).
  2. Make the change, run npm run check and npm run docs (CI fails if a generated example README is stale).
  3. Open one focused PR. Say what you verified, and mention any substantial AI assistance (see CONTRIBUTING.md).

Comment here if you want to take it, and ask anything that is unclear.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions