ci: build and push multi-arch images

This commit is contained in:
Quentin Gliech
2021-11-01 17:30:49 +01:00
parent e854b6a053
commit 6acd61e01b
2 changed files with 7 additions and 2 deletions

View File

@@ -332,6 +332,9 @@ jobs:
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
@@ -347,6 +350,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -1,8 +1,9 @@
ARG RUSTC_VERSION=1.55.0
ARG RUSTC_VERSION=1.56.0
# cargo-chef helps with caching dependencies between builds
FROM lukemathwalker/cargo-chef:latest-rust-${RUSTC_VERSION} AS chef
FROM docker.io/library/rust:${RUSTC_VERSION}-slim AS chef
WORKDIR /app
RUN cargo install --locked cargo-chef
FROM chef AS planner
COPY . .