Skip to content

shell-gate: reusable gate for shell and just repositories - #31

Merged
markope merged 1 commit into
mainfrom
feat/shell-gate
Nov 4, 2026
Merged

markope merged 1 commit into
mainfrom
feat/shell-gate

Conversation

@markope

@markope markope commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What and why

A reusable gate for shell and just repositories, as the README promised for the first one adopting the harness: IronFlock/flockos, the image builder. Tracks #30 (FlockOS IronFlock/ironflockos#109).

  • .github/workflows/shell-gate.yml: jobs lint, unit, build run the caller's recipes. just, shellcheck, shfmt from tools.lock; yamllint (lint) and bats with bats-support and bats-assert (unit) from the Ubuntu archive.
  • Inputs: build-apt-packages (mmdebstrap, genimage and the like, build job only), build-args (e.g. amd64-efi base), build-runs-on (native arm64), build-timeout-minutes, and build-artifact-path / -name / -retention-days so an image test or release job of the caller gets the build output.
  • tools.lock: shfmt 3.14.1 (digest from the release asset).
  • Self-test: shell-gate-pass runs the gate on tests/fixtures/shell-pass, shell-gate-artifact downloads its build output in a later job, shell-gate-fail asserts that just lint fails on an unquoted expansion and just test on a failing bats test. All three are in selftest-ok.
  • README gate table and recipe contract; caller template templates/workflows/ci-shell.yml.

How it was tested

Locally: actionlint 1.7.12, zizmor 1.31.1 with the harness config and --min-severity medium, yamllint on the new files; shellcheck flags the fail fixture and passes the pass fixture; both fixture Justfiles pass just --fmt --check. The self-test on this pull request is the real test.

After the merge: just release-patch publishes v1.5.0 or v1.4.3 (a new workflow is a minor change: just release-minor) and moves v1; then flockos switches its gate job to the shared one.

The first shell repository adopting the harness is IronFlock/flockos (image
builder). The gate follows the other gates: jobs lint, unit, build run the
caller's just recipes. just, shellcheck and shfmt come from tools.lock (shfmt
3.14.1 added), yamllint and bats with bats-support and bats-assert from the
Ubuntu archive. Inputs for build-only apt packages, the build recipe's
arguments, the build runner (native arm64) and an artifact of the build output
for later jobs of the caller.

Self-test: shell-pass passes the gate and its artifact reaches a later job;
shell-fail must fail lint (unquoted expansion) and test (failing bats test).
README gate table and recipe contract, and a caller template ci-shell.yml.
@markope
markope merged commit 3c66df7 into main Nov 4, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant