~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

Steps that run at main alone say so with on

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ci/step-on

What changes

Ref gates. The workflows' steps that ran only at main said so in shell, with a test of KNOTLESS_RUN_REF that ended the step early. They now say it with a step's on: {refs: [refs/heads/main]}, which the runner reads. In release.yml, publish loses its ref test and keeps its ~/.done test. In publish-lexicons.yml, publish gets on, so a run asked for at another branch plans and writes nothing. Before, such a run tried the write with no secrets and failed whenever there was something to change.

wait-for-checks 2. Both uses of chadtmiller.com/steps/wait-for-checks move from @1 with only-on: refs/heads/main to @2 with that on. 2.0.0 drops the only-on input and its shell gate. .knotless/uses.lock is repinned with knotless uses update.

Left as they are. The marker-file gates ([ ! -e ~/.done ] || exit 0 in release.yml, ~/.moved and ~/.up in deploy.yml) are a step telling later steps something, which on does not cover. The cache tests in test.yml, e2e.yml and scenarios.yml and the TRACKS test in scenarios.yml are not about refs. release.yml's version step still prints "publishing nothing" off main. That line only says so in the log and gates nothing. deploy.yml is left to the pull changing how uses steps pass secrets.

docs/design/reusable-workflows.md's example step file had an only-on input, right above the paragraph saying a step needs no such input. It now has minutes.

Why

on landed for exactly these steps. The runner reads it, the check shows the step as skipped with a reason, and it holds on a pull's run, whose KNOTLESS_RUN_REF is its head branch: a fork's main passes a shell test of refs/heads/main.

How it was checked

knotless uses update, run with this checkout's client, pinned wait-for-checks@2 at 2.0.0. The rest is left to the runner.

This pull's runs can't show the gated steps working. A step with on is skipped on a pull's run, and release and publish-lexicons don't run on pulls at all. So on first decides anything on main after this merges. This pull changes .knotless/workflows/publish-lexicons.yml, which is in that workflow's paths, so the push that lands it runs publish-lexicons at main. That run should wait for the checks and then publish, with nothing to change. release runs only on a change to Cargo.toml, so its gated steps first run at the next release.

Shortcomings

release.yml's gated steps are first exercised by the next version bump. If on misbehaves there, that release is the run that shows it.

🤖 Generated with Claude Code

Approved

This moves the main-only gates in release.yml and publish-lexicons.yml from shell ref tests to step-level on: {refs: [refs/heads/main]}. It also moves both wait-for-checks uses to @2, with the lock repinned, and fixes the design doc example. I checked each change against docs/reference/workflows.md, which documents on on uses steps. I found no problems.

  • publish in release.yml still guards on ~/.done, so it no longer depends on the ref in shell.
  • publish-lexicons now skips both the wait and the write off main. The old behaviour failed when there was something to change.
  • No changeset is needed, since nothing under the client crates changed. No other docs page is affected.

I couldn't confirm that the wait-for-checks@2 release and the pinned commit d5b057a exist. The pull's own checks can't exercise the gated steps either, as the body says. The lexicon-publish run after merge will be the first real test.

Merged as 0924870