Skip to content

Build images natively per architecture#375

Open
Wuodan wants to merge 9 commits intonikolaik:mainfrom
Wuodan:upstream-PR/02-replace-qemu-with-arm64-runner
Open

Build images natively per architecture#375
Wuodan wants to merge 9 commits intonikolaik:mainfrom
Wuodan:upstream-PR/02-replace-qemu-with-arm64-runner

Conversation

@Wuodan
Copy link

@Wuodan Wuodan commented Mar 17, 2026

Replace the QEMU-based multi-platform build with native amd64 and arm64 runner jobs.

During my tests I also ran into problems with the rate-limit (200 pulls per 6h) for free accounts on docker.io.

I worked around this:

  • log in to docker.io late in the workflow so earlier pulls happen anonymously and not affected by the rate-limit
  • for the multi-arch manifests I replaced docker buildx imagetools (which does pull while logged in) with a local docker manifest create followed by authenticated docker manifest push.

This has the positive side-effect of running tests for each arch image and not just for the arm64 images.

Fixes #258.

This PR includes the commits of PR #373 as I needed those to run tests in my fork.

Wuodan added 2 commits March 17, 2026 02:30
Keep nikolaik/python-nodejs as the default image name in the workflow, but resolve it through a GitHub Actions variable so forks can publish to a different image without changing the repository.

Forks can set IMAGE_NAME in Actions variables or in workflow run configuration. That keeps the default behavior unchanged here while avoiding fork-specific edits in PRs.
Allow manual workflow runs from GitHub Actions with a force option and an optional IMAGE_NAME override.
This makes it possible to test publish flows without overwriting the real published images tags.
Wuodan added 3 commits March 17, 2026 12:39
Replace the QEMU-based multi-platform build with native amd64 and arm64 runner jobs, then publish the final image tags by assembling a manifest from the architecture-specific tags. Fixes nikolaik#258.

Run the smoke test suite against each architecture-specific image before publishing the final manifest, instead of only testing the locally loaded amd64 image. The build-matrix helper now emits an architecture-expanded matrix for the workflow, and the new unit test covers that expansion. Fixes nikolaik#314.
Split the per-architecture workflow so each image is built locally, smoke-tested, and only then pushed to Docker Hub as an architecture-specific tag.

This avoids publishing untested architecture images and keeps Docker Hub out of the build phase, so public base-image pulls are no longer attributed to the authenticated Docker Hub account.
Replace the deploy-side use of `docker buildx imagetools create` with a local `docker manifest create` followed by authenticated `docker manifest push`.

This keeps the manifest assembly step anonymous and delays Docker Hub login until the actual publish step, which reduces authenticated rate-limit failures during multi-arch manifest publication.
@Wuodan Wuodan force-pushed the upstream-PR/02-replace-qemu-with-arm64-runner branch from 6f07c01 to e247afd Compare March 17, 2026 13:24
Wuodan added 3 commits March 18, 2026 11:08
Address review feedback on PR nikolaik#373 by renaming the manual image override input and reformatting long shell commands for readability.
…replace-qemu-with-arm64-runner

# Conflicts:
#	.github/workflows/build.yaml
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.

Replace qemu with runs-on: ubuntu-24.04-arm

1 participant