Interview Prep/GitHub Actions/Speed, Caching & Cost

Multi-arch images take 40 minutes because arm64 builds use QEMU. Fix it.

AdvancedScenarioSpeed, Caching & Cost
Answer

Situation read → Emulation is 5 to 20 times slower than native.

What I'd do →

  1. Matrix over native runners: ubuntu-24.04 (amd64) and ubuntu-24.04-arm (arm64).
  2. Each leg builds and pushes by digest only (outputs: type=image,push-by-digest=true,name-canonical=true,push=true) and uploads the digest as artifact digest-${{ matrix.arch }}.
  3. Merge job downloads digests and runs docker buildx imagetools create -t $IMAGE:$TAG $IMAGE@sha256:a $IMAGE@sha256:b.

Why → Native builds remove emulation entirely; the manifest list makes one tag serve both architectures.

Interview tip → Name the pattern: "build by digest per platform, merge manifest".

All GitHub Actions questions Roadmap: GitHub Actions

More on Speed, Caching & Cost