Repository navigation
ci: a nightly create flow boots a scaffolded app, here instead of in the template - #36
Merged
Merged
Conversation
…the template The check lived in cellajs/cella, which is a template: `create-cella` copies .github/workflows/ into every scaffolded app and only strips the two infra/Pulumi.*.yaml files, so every new app inherited the workflow. A scaffolded app is a fresh repo rather than a GitHub fork, so GitHub does not disable its schedules: the cron fired nightly in raak, projectcampus and any other app, for three legs of up to 40 minutes, and failed there (the verify step greps for `slug: 'my-app'` and asserts the Cella-Base trailer against cellajs/cella, and the heads leg scaffolded from a checkout whose config.template.ts the create had already consumed). GitHub mailed each failure to the app's last committer. This repo is the better home anyway: the scaffolder is what the check tests, and it already owns that ladder - tests/e2e.test.ts scaffolds from the live template and tests/release-smoke.test.ts scaffolds through the packed bin at publish time. This is the rung above them, the first that installs, migrates, boots and clicks. Nothing leaks out of here, and the workflow needs no secrets. Changes against the version in the template: - One shallow cella clone serves as both the smoke driver's source for every leg and the template the heads leg scaffolds from. The driver stays in cella (cella/skills/verify/smoke-driver.mjs) and is run from the clone, never from the created app, because the published leg's app is built at a release that may not carry it yet. - The heads leg scaffolds with this checkout rather than a clone of this repo's main, so a create-cella PR exercises its own code. - A `cella-ref` dispatch input replaces "dispatch the workflow on a cella branch": it picks the branch or tag the heads leg scaffolds from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the nightly create-flow check out of
cellajs/cellaand into this repo. Pairs with cellajs/cella#1321 — merge this one first, so there is no night without the check.Why it could not stay in the template
cellajs/cellais a template.create-cellacopies.github/workflows/into every scaffolded app and strips only the twoinfra/Pulumi.*.yamlfiles (TO_REMOVE), so every new app inheritedcreate-flow.yml.A scaffolded app is a fresh repo, not a GitHub fork, so GitHub does not disable its schedules. The cron fired nightly in raak, projectcampus and any other app, three legs of up to 40 minutes each — and failed there:
slug: 'my-app'and asserts theCella-Basetrailer againstcellajs/cellatags;headsleg scaffolded from$GITHUB_WORKSPACE, whoseshared/config/config.template.tsthe create had already consumed and deleted.GitHub mails a failed scheduled run to the repo's last committer, so every app owner got the mail.
pnpm cella syncalso kept the file current in forks, since.github/is synced.Why here
The scaffolder is what the check tests, and this repo already owns that ladder:
tests/e2e.test.tsscaffolds from the live template and reads the result,tests/release-smoke.test.tsscaffolds through the packed bin at publish time. This is the rung above them — the first that installs, migrates, boots and clicks. Nothing leaks out of this repo, and the workflow needs no secrets (justgithub.tokenfor the release lookup).What changed against the version in the template
headsleg scaffolds from. The driver stays in cella (cella/skills/verify/smoke-driver.mjs) and runs from the clone, never from the created app, because thepublishedleg's app is built at a release that may not carry it yet.headsleg scaffolds with this checkout instead of a clone of this repo'smain, so a PR here exercises its own code.cella-refdispatch input replaces "dispatch the workflow on a cella branch": it picks the branch or tag theheadsleg scaffolds from (and the driver for every leg).Everything else is unchanged: three legs (
published,published-main,heads), one step per README line, the step-outcome summary table, and the artifact with the stack log, screenshots andevidence.json.pnpm check,pnpm testandpnpm buildon the created app are still deliberately out.Checks
actionlintclean (rhysd/actionlint:latest).pull_requestpaths filter on this file means this PR runs all three legs, which is how the workflow gets tried before it exists onmain.publishedto stay red: npm serves@cellajs/create-cella0.3.7 whilemainis 0.3.9, so that leg builds from a scaffolder predating cella#1310's fix. Pre-existing, and it clears on the next publish.published-mainandheadsare the legs to read.🤖 Generated with Claude Code