Build the multi-arch image only on main, amd64 elsewhere#808
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts the Docker build reusable workflow to reduce GitHub Actions minutes by avoiding emulated arm64 builds except where they are needed for main releases. This aligns the CI/smoke and develop builds with an amd64-only strategy while keeping main publish runs multi-arch.
Changes:
- Introduces a job-level
PLATFORMSenv var to centrally control target Docker platforms. - Installs QEMU only when the platform set includes
arm64. - Routes both Buildx setup and
docker/build-push-actionto use the sharedPLATFORMSvalue.
The Docker build dominates Actions minutes and arm64 is emulated on the amd64 runner, so build linux/amd64,linux/arm64 only on a full main publish; smoke and develop build linux/amd64 only. A job-level env.PLATFORMS drives buildx and build-push, and QEMU is set up only when arm64 is in the platform set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ptr727
force-pushed
the
feature/branch-conditional-platforms
branch
from
July 7, 2026 01:45
308660c to
2cc547d
Compare
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.
Adopt the fleet #248 branch-conditional Docker platforms. The Docker build is ~99% of Actions minutes, and arm64 is emulated (slow) on the amd64 runner, so build multi-arch (
linux/amd64,linux/arm64) only on a fullmainpublish; smoke anddevelopbuildlinux/amd64only. A job-levelenv.PLATFORMSdrives buildx + build-push, and QEMU (arm64 emulator) is installed only whenarm64is in the set. Mirrors the already-merged ESPHome-NonRoot form. actionlint + editorconfig-checker clean; workflow stays LF.