Skip to content

Skill: cover publishing images to a registry from CI - #294

Merged
dboreham merged 2 commits into
mainfrom
dboreham/skill-publish-images
Aug 20, 2026
Merged

Skill: cover publishing images to a registry from CI#294
dboreham merged 2 commits into
mainfrom
dboreham/skill-publish-images

Conversation

@dboreham

Copy link
Copy Markdown
Member

Why

skills/deploy-with-stack/SKILL.md is the only file that reaches an agent's context, and it treats local builds as the only path. It never mentions --publish-images, the build policies, or CI, and names a registry exactly once — the --image-registry flag in the k8s init example, where it reads as a Kubernetes requirement rather than a build strategy.

The result is that an agent following the skill end to end produces a project that rebuilds every image on every deploy host, with no route to prebuilt images. docs/fetching-containers.md and docs/image-names.md cover this well; the skill just never points at it.

Found while using the skill on a real project — the container names came out as kestrel/api and kestrel/frontend in a repo under a different GitHub org, which validates fine and would have silently defeated ghcr discovery.

What

  • New optional section after the build step. The discovery pair — name taken verbatim from stack.yml with the registry host prefixed (inferred from the recipe repo's git host), tag being the recipe repo's commit hash — then --publish-images, and a ready-to-copy GitHub Actions workflow modelled on the one in stack-test-stacks. Closes with the three things that actually bite: namespace correctness, stackdev- versions never publishing, and architecture matching.
  • Tightened container-name rule. It said <organization>/<name> without saying which organization. Now says the namespace is the one the images publish under (for github, the org owning the repo), that the second segment is free-form and not derived from the repo name — so one repo can publish several images, as example-todo-list does with todo-frontend/todo-backend — and that nothing validates the namespace, so a wrong one is a silent miss rather than an error.

Docs only; no code paths touched.

🤖 Generated with Claude Code

https://claude.ai/code/session_019ooJdzrsdCT2QSFnRida4j

dboreham and others added 2 commits August 20, 2026 09:52
The skill took local builds as the only path: it never mentioned
--publish-images, the build policies, or CI, and named a registry once, in
the k8s init example, where it reads as a Kubernetes requirement rather than
a build strategy. An agent following it end to end produces a project that
rebuilds every image on every deploy host with no route to prebuilt images.

Adds an optional section after the build step explaining the discovery pair
(name from stack.yml + tag from the recipe repo commit hash, registry
inferred from the git host), the publish flag, and a GitHub Actions workflow.

Also tightens the container-name rule. It said names are <organization>/<name>
without saying which organization, so a name that reads well but does not
match the GitHub org passes validation and silently defeats registry
discovery later — a breaking rename to fix. Says which namespace, and that
the second segment is free-form so one repo can publish several images.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ooJdzrsdCT2QSFnRida4j
Hit this on a real project: the workflow the skill now recommends built both
images and pushed neither, with only a WARN in the log saying they were not
built from committed, pinned inputs.  The cause was that stack.lock did not
exist in the repo, so CI generated it at build time; an uncommitted lock is
treated as unpinned and yields a stackdev- tag, which is never published.

The bullet said "only clean, committed, fully-pinned state publishes" but did
not say that generating and committing the lock is a setup step, so following
the skill exactly produces a workflow that silently never publishes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019ooJdzrsdCT2QSFnRida4j
@dboreham
dboreham merged commit ba2d98e into main Aug 20, 2026
14 checks passed
@dboreham
dboreham deleted the dboreham/skill-publish-images branch August 20, 2026 20:30
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