Adopt branch-conditional Docker platforms (multi-arch main, amd64 elsewhere) - #248
Merged
Conversation
…branch, amd64 elsewhere Generalize the pattern proven on ESPHome-NonRoot (#125): compute the platform list once as job-level env.PLATFORMS in build-docker-task, reference it from both build steps, and gate QEMU on contains(env.PLATFORMS, 'arm64'). The default branch builds multi-arch (amd64+arm64); any other branch builds amd64 only, reserving arm64 emulation (~the bulk of Docker CI minutes) for the released image. Update the WORKFLOW.md Docker guarantees to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the template's Docker build contract and reusable snippet to reduce CI cost by limiting arm64 emulation to default-branch publish runs, while keeping non-default branch builds amd64-only.
Changes:
- Document Docker's branch-conditional platform behavior in
WORKFLOW.md(multi-arch on default branch, amd64-only elsewhere). - Refactor the Docker build task snippet to compute a single job-level
env.PLATFORMS, reuse it for Buildx/build-push, and gate QEMU setup based on whether arm64 is included.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| WORKFLOW.md | Updates the documented Docker behavioral contract to describe default-branch multi-arch vs. amd64-only elsewhere. |
| catalog/snippets/workflows/build-docker-task.yml | Implements a single PLATFORMS selector, uses it consistently for Buildx/build, and conditionally installs QEMU only when arm64 is included. |
Reserve arm64 emulation for the released image by keying env.PLATFORMS off inputs.push (main => multi-arch only when actually publishing). Register QEMU with the proven os/arch form linux/arm64 (the form the original config used successfully). Addresses Copilot review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 6, 2026
Merged
ptr727
added a commit
that referenced
this pull request
Jul 7, 2026
Two-phase promotion of the accumulated governance work on `develop` to `main`. Carries #244-#251: - #244 Foundational Principles (the model's governing *why*) - #245 Replace the mypy ban with a strong-typing policy - #246 aiopurpleair + homeassistant-purpleair audit reports - #247 Catalog the 14 backlog repos; add the `eda` type and `releaseTrigger: none` - #248 Branch-conditional Docker platforms (multi-arch main, amd64 elsewhere) - #249 Retire the both-branch matrix for symmetric single-branch self-release - #250 Declare workflow YAML as LF and validate line endings in CI - #251 Extend line-ending governance to pattern files and catalog snippets All commits were reviewed and CI-green on their individual develop PRs.
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.
Generalizes the platform pattern proven on ESPHome-NonRoot #125 into the catalog build-docker-task snippet + the WORKFLOW.md contract.
env.PLATFORMScomputes the platform list; both build steps reference it; QEMU gates oncontains(env.PLATFORMS, 'arm64').WORKFLOW.md Docker guarantees updated to describe the split.