From b3d5a22b5dfbd877b55963386edb70dd72e0ee93 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Wed, 14 Aug 2024 17:20:08 +0100 Subject: [PATCH] Add support for armv7 in the docker build --- .github/workflows/publish.yml | 6 ++++++ Dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0b0289a..c692283 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,6 +31,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm32v7/armhf, arm64v8/aarch64 + # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -59,6 +64,7 @@ jobs: uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . + platforms: linux/arm/v7,linux/arm64,linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 556e2d2..5780769 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-slim +FROM --platform=$TARGETPLATFORM python:3.9-slim:3.12-slim LABEL org.opencontainers.image.source=https://github.com/mdiluz/matchy LABEL org.opencontainers.image.description="Matchy matches matchees" LABEL org.opencontainers.image.licenses=Unlicense