build: publish multi-platform image (amd64, arm64, arm/v7)
The builder stage runs on the build platform and cross-compiles Rust, with GCC cross compilers for bundled SQLite, so only the small runtime stage runs under QEMU. The workflow sets up QEMU via the Docker Hub mirror and pushes all three platforms under the same tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7bdf7b79d3
commit
ae49c8f8c3
3 files changed
+41
-3
No files matched your search
@@ -55,6 +55,13 @@ jobs:
|
||||
echo "image=$image" >> "$GITHUB_OUTPUT"
|
||||
echo "Publishing $image:$tag as $REGISTRY_USER"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
# Only the runtime stage runs emulated; Rust is cross-compiled natively.
|
||||
image: ${{ vars.DOCKERHUB_MIRROR || 'mirror.gcr.io' }}/tonistiigi/binfmt:latest
|
||||
platforms: arm64,arm
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
@@ -75,6 +82,7 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.meta.outputs.image }}:${{ steps.meta.outputs.version_tagname }}
|
||||
|
||||
Reference in new issue
Block a user