Skip to content

Implement multi-arch container build with native runners#1328

Merged
simu merged 3 commits into
masterfrom
ci/improve-multi-arch-build
Mar 24, 2026
Merged

Implement multi-arch container build with native runners#1328
simu merged 3 commits into
masterfrom
ci/improve-multi-arch-build

Conversation

@simu
Copy link
Copy Markdown
Member

@simu simu commented Mar 24, 2026

We adjust the container build GitHub workflow to use a matrix job on ubuntu-24.04 and ubuntu-24.04-arm to build the container image and have a subsequent job which creates the multi-arch image from the two images built by the matrix job.

Additionally, the commit factors out the version generation for the Python package and the container and the creation of the GitHub release into separate jobs.

Note that the workflow pushes latest and tagged containers to docker.io. However, the build matrix job always only pushes to ghcr.io and the merge job will copy the final images from ghcr.io to docker.io if necessary.

Inspired by https://github.com/sredevopsorg/multi-arch-docker-github-workflow/blob/main/.github/workflows/multi-build.yaml

Follow-up for #1292

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency, internal
    as they show up in the changelog
  • Link this PR to related issues.

@simu simu added the internal Internal changes which don't affect users but should appear in the changelog label Mar 24, 2026
@simu simu force-pushed the ci/improve-multi-arch-build branch 16 times, most recently from db3f6a7 to 59b7f42 Compare March 24, 2026 12:51
@simu simu marked this pull request as ready for review March 24, 2026 13:05
@simu simu requested a review from a team as a code owner March 24, 2026 13:05
@simu simu requested a review from a team March 24, 2026 13:05
@simu simu changed the title Implement multi arch container build with native runners Implement multi-arch container build with native runners Mar 24, 2026
simu added 2 commits March 24, 2026 14:09
We adjust the container build GitHub workflow to use a matrix job on
`ubuntu-24.04` and `ubuntu-24.04-arm` to build the container image and
have a subsequent job which creates the multi-arch image from the two
images built by the matrix job.

Additionally, the commit factors out the version generation for the
Python package and the container and the creation of the GitHub release
into separate jobs.

Note that the workflow pushes `latest` and tagged containers to
docker.io. However, the build matrix job always only pushes to ghcr.io
and the merge job will copy the final images from ghcr.io to docker.io
if necessary.

The implementation is inspired by
https://github.com/sredevopsorg/multi-arch-docker-github-workflow/blob/main/.github/workflows/multi-build.yaml
Comment thread .github/workflows/container-image.yml Outdated
This allows us to avoid the bad switch reimplementation for the
`build.runs-on` value.
@simu simu force-pushed the ci/improve-multi-arch-build branch from 59b7f42 to adbb812 Compare March 24, 2026 13:30
@simu simu merged commit 2538872 into master Mar 24, 2026
24 checks passed
@simu simu deleted the ci/improve-multi-arch-build branch March 24, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Internal changes which don't affect users but should appear in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants