From fb7175e5ec059d227ee0a45add88bb8cf386bf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 26 Aug 2024 22:47:49 +0200 Subject: [PATCH] feat(images): Build multi-arch images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- .github/workflows/build-test.yml | 8 +++++++- .github/workflows/docker.yml | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 21812224..cc1dfa13 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -48,7 +48,13 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build Docker image ${{ matrix.dockerfile }} run: | cd "$(dirname ${{ matrix.dockerfile }})" - docker build . --file Dockerfile + docker build --platform linux/amd64,linux/arm64 . --file Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8fb5d761..c130e08d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,6 +38,12 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to GitHub Docker Registry uses: docker/login-action@v1 with: @@ -55,6 +61,7 @@ jobs: - name: Build container image uses: docker/build-push-action@v2 with: + platforms: linux/amd64,linux/arm64 push: true context: ${{ github.event.inputs.folderPath }} file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'