Skip to content

Refactor Docker image build workflows into ci/prerelease/release tiers - #14

Merged
mkarlesky merged 3 commits into
masterfrom
ci-refactor-validation
Jul 27, 2026
Merged

Refactor Docker image build workflows into ci/prerelease/release tiers#14
mkarlesky merged 3 commits into
masterfrom
ci-refactor-validation

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

  • Replace the duplicated per-variant job bodies in dev.yml/release.yml with a single reusable _build-variant.yml called from a 4-way matrix.
  • Split event handling into three purpose-built workflows: ci.yml (push/PR — generate + hadolint + docker buildx build --check, no real image build), prerelease.yml (new — v*.*.*-pre.* tags, real multi-platform build with no Docker Hub push, GitHub prerelease with changelog-extracted notes), release.yml (v*.*.* tags excluding -pre.* — adds Docker Hub push and a full GitHub release).
  • Adopts a v-prefixed tag convention (v1.1.2, v1.1.2a, v1.1.2a-pre.1) and reuses Ceedling's extract_changelog.sh for changelog-driven release notes.

Test plan

  • YAML parses cleanly for all 4 changed/new workflow files
  • hadolint and docker buildx build --check pass locally against all 4 generated Dockerfiles
  • extract_changelog.sh verified locally against docs/Changelog.md for both a found and a not-found version
  • Tag-glob matching hand-traced for v1.1.2, v1.1.2a, v1.1.2a-pre.1, v1.1.2-pre.1 — exactly one of prerelease/release fires per tag
  • ci.yml runs green on this PR's push + pull_request triggers (validating no real image build occurs)
  • prerelease.yml runs green against a throwaway v0.0.1-pre.1 tag (real multi-platform build, no Docker Hub push, GitHub prerelease created) — to be tested separately, tag will be deleted afterward
  • release.yml's Docker Hub push path is deferred to the next real release tag (not exercised here to avoid touching production :latest)

🤖 Generated with Claude Code

mkarlesky and others added 3 commits July 27, 2026 13:29
Replace the duplicated per-variant job bodies in dev.yml/release.yml with
a single reusable _build-variant.yml called from a 4-way matrix, and split
event handling into three purpose-built workflows:

- ci.yml: push/PR, generates all variants and validates with hadolint +
  `docker buildx build --check` only, no real image build
- prerelease.yml (new): v*.*.*-pre.* tags, adds a real multi-platform
  build (no Docker Hub push) and a GitHub prerelease with notes extracted
  from docs/Changelog.md
- release.yml: v*.*.* tags (excluding -pre.*), adds a Docker Hub push and
  a full GitHub release

Adopts a `v`-prefixed tag convention (v1.1.2, v1.1.2a, v1.1.2a-pre.1) and
reuses Ceedling's extract_changelog.sh for changelog-driven release notes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The generated gem install RUN commands target pre-built .gem files whose
versions are pinned via Gemfile.lock at image-build time, not a live
rubygems.org fetch — hadolint can't see through the glob to know that,
so DL3028 fires as a false positive on every variant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
_build-variant.yml's job requests attestations:write, id-token:write, and
packages:write (for the real multi-platform docker build). A reusable
workflow's job can't request more permissions than its caller grants, and
declaring any permissions: block at all caps everything unlisted at
none — so prerelease.yml's contents-only permissions block was silently
capping these to none and causing a startup_failure with zero jobs
(discovered by actually pushing a v0.0.1-pre.1 tag). ci.yml never hit this
because it has no permissions: block and inherits the default token scope.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkarlesky
mkarlesky merged commit 4cc97dd into master Jul 27, 2026
9 checks passed
@mkarlesky
mkarlesky deleted the ci-refactor-validation branch July 27, 2026 20:01
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