Skip to content

Define image release contract module (#2)#7

Merged
zengsipei merged 1 commit into
mainfrom
feat/image-release-contract
Jun 23, 2026
Merged

Define image release contract module (#2)#7
zengsipei merged 1 commit into
mainfrom
feat/image-release-contract

Conversation

@zengsipei

Copy link
Copy Markdown
Owner

Closes #2.

Establishes a single owner for the Prebuilt Image release facts and fixes the documentation-vs-automation drift found in the architecture review.

Contract (single source of truth: docs/adr/0001-image-release-contract.md)

  • Trigger — publish only on a v* Release Tag push or a Manual Rebuild (workflow_dispatch naming an existing tag); no main-branch release.
  • :latest — alias for the most recent Release Tag; only a Release Tag push moves it. Manual Rebuild never moves it (closes the old dispatch-from-main:main hole).
  • Pinning — template defaults to :latest; pinning :vX.Y.Z documented as opt-in.
  • Ownership — ADR owns the contract; workflow owns the mechanism; devimage-build/README is the single prose owner; root + .devcontainer READMEs only link.
  • Forkable — image owner/name → repo Variables (vars.DOCKERHUB_USERNAME / vars.IMAGE_NAME, with defaults); compose reads them via .env; only DOCKER_HUB_TOKEN stays a secret.

Changes

  • New: ADR 0001, scripts/check-release-contract.sh, release-contract-check.yml CI.
  • Workflow: vars-based image identity, required tag input for Manual Rebuild, :latest moved only on tag push.
  • Compose/.env: parameterized image ref + documented vars.
  • CONTEXT.md: Release Tag · Latest Pointer · Release Trigger · Manual Rebuild.
  • Docs: devimage-build/README release section rewritten (drift fixed: false main trigger, DOCKER_HUB_USERNAME secret, build-push-action); root + .devcontainer READMEs shrunk to links; removed the manual docker push :latest instructions.

CI

scripts/check-release-contract.sh asserts: compose default image == workflow default; on: is exactly {tag v*, workflow_dispatch} with no branch trigger; grep-guard keeps retired false claims out of the docs. Passes locally.

Follow-up

Establish a single owner for the Prebuilt Image release facts and fix
the documentation-vs-automation drift found in the architecture review.

- Add ADR 0001 as the single source of truth: tag-driven releases
  (v* + manual dispatch, no main), :latest = newest Release Tag,
  default-latest with opt-in pinning.
- Workflow: move image owner/name to repo variables (forkable), add a
  required tag input for Manual Rebuild, and only move :latest on a tag
  push (closes the dispatch-from-main hole).
- Parameterize the compose image ref via .env and document the vars.
- Add release domain terms to CONTEXT.md (Release Tag, Latest Pointer,
  Release Trigger, Manual Rebuild).
- Make devimage-build/README the single prose owner of release facts and
  fix the drift; shrink root and .devcontainer READMEs to links.
- Add scripts/check-release-contract.sh + CI workflow to guard against
  doc/automation drift.

Follow-up: #6 (pull_policy :latest auto-pull bug).
@zengsipei zengsipei merged commit 8051fca into main Jun 23, 2026
1 check passed
@zengsipei zengsipei deleted the feat/image-release-contract branch June 23, 2026 21:33
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.

Explore an image release contract module

1 participant