Add multi-arch Docker build CI/CD workflow (amd64 + arm64)#1169
Open
antoinetielbeke wants to merge 1 commit into
Open
Add multi-arch Docker build CI/CD workflow (amd64 + arm64)#1169antoinetielbeke wants to merge 1 commit into
antoinetielbeke wants to merge 1 commit into
Conversation
Automates building and publishing the official Docker image (tobiashoessl/antragsgruen) for both amd64 and arm64 on every release. Key features: - Multi-arch builds: linux/amd64 + linux/arm64 via QEMU + Buildx - Automated release workflow triggered on GitHub Releases - Also runs on pushes to main (path-filtered) and PRs (dry-run) - Manual dispatch with optional version override - Pushes to Docker Hub and GitHub Container Registry - Generates distribution tarball matching create-dist.sh behavior - Build caching via GitHub Actions cache for faster rebuilds Required secrets: - DOCKER_HUB_USERNAME: Docker Hub username - DOCKER_HUB_TOKEN: Docker Hub access token
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.
Summary
Automates building and publishing the official Docker image (
tobiashoessl/antragsgruen) for both amd64 and arm64 architectures on every release.This mirrors the manual command already documented in
docs/create-dist.sh(line 7):Why multi-arch / ARM support?
We (Volt Europa) run Antragsgruen on an ARM-based Kubernetes cluster, and the current single-arch amd64 image is unusable for us.
What it does
main(path-filtered)main-tagged imageworkflow_dispatchThe distribution tarball is generated inline (matching
docs/create-dist.sh), then fed into the Docker build viaAPP_ARCHIVEbuild arg — preserving the exact same deployment artifact your Apache Dockerfile expects.Question for you: Docker Hub only or also GHCR?
I configured it to push to both Docker Hub (
tobiashoessl/antragsgruen) and GitHub Container Registry (ghcr.io/tobiashoessl/antragsgruen). GHCR has the advantage of:GITHUB_TOKENauto-generated (no secret setup needed)But if you prefer to keep it Docker Hub only, I can simplify to one registry. What do you think?
Required secrets
To enable the Docker Hub push, you need to add two repository secrets:
DOCKER_HUB_USERNAMEDOCKER_HUB_TOKENThe GHCR push uses the auto-generated
GITHUB_TOKENand needs no extra setup.Verification
You can test the workflow by running it via
workflow_dispatchfrom the Actions tab before any release. On PRs, it builds without pushing so you can verify the Dockerfile compiles correctly.