From 232f8a463f73d6743f914b0406922559b5ce5638 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 1/2] 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 | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0342009..6b76b89 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -48,7 +48,13 @@ jobs: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up QEMU + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 + - name: Build Docker image ${{ matrix.dockerfile }} run: | cd "$(dirname ${{ matrix.dockerfile }})" - docker build . --file Dockerfile + docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 177a80b..cec905e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -45,6 +45,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 @@ -58,6 +61,7 @@ jobs: - name: Build container image uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 with: + platforms: linux/amd64,linux/arm64 push: true context: ${{ github.event.inputs.folderPath }} file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}' From 8d6d1e79bdf2206005b8baca873c696019d586e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 26 Aug 2024 22:52:47 +0200 Subject: [PATCH 2/2] fix(test): Also run on workflow change 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6b76b89..cab38a2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -5,10 +5,12 @@ on: branches: [ master ] paths: - '*/Dockerfile' + - '.github/workflows/build-test.yml' pull_request: branches: [ master ] paths: - '*/Dockerfile' + - '.github/workflows/build-test.yml' jobs: files: