Skip to content

Build the multi-arch image only on main, amd64 elsewhere#808

Merged
ptr727 merged 1 commit into
developfrom
feature/branch-conditional-platforms
Jul 7, 2026
Merged

Build the multi-arch image only on main, amd64 elsewhere#808
ptr727 merged 1 commit into
developfrom
feature/branch-conditional-platforms

Conversation

@ptr727

@ptr727 ptr727 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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 full main publish; smoke and develop build linux/amd64 only. A job-level env.PLATFORMS drives buildx + build-push, and QEMU (arm64 emulator) is installed only when arm64 is in the set. Mirrors the already-merged ESPHome-NonRoot form. actionlint + editorconfig-checker clean; workflow stays LF.

Copilot AI review requested due to automatic review settings July 7, 2026 01:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 PLATFORMS env var to centrally control target Docker platforms.
  • Installs QEMU only when the platform set includes arm64.
  • Routes both Buildx setup and docker/build-push-action to use the shared PLATFORMS value.

Comment thread .github/workflows/build-docker-task.yml
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
ptr727 force-pushed the feature/branch-conditional-platforms branch from 308660c to 2cc547d Compare July 7, 2026 01:45
@ptr727
ptr727 merged commit 08fad4f into develop Jul 7, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/branch-conditional-platforms branch July 7, 2026 01:48
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.

2 participants