From 9c8b932571a6bcef8f7bdcc3228eadc34c48bf34 Mon Sep 17 00:00:00 2001 From: Rouven Himmelstein Date: Fri, 19 Aug 2022 16:12:46 +0200 Subject: [PATCH] feat: user docker buildx --- .github/workflows/build-image.yaml | 35 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index ff24d1e..3b927eb 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -144,20 +144,33 @@ jobs: uses: actions/checkout@v3 - name: Set up QEMU - run: sudo apt install -y qemu-user-static + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/${{ matrix.container-image-arch }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Build container image - uses: redhat-actions/buildah-build@v2 + uses: docker/build-push-action@v3 with: - image: ${{ env.IMAGE_NAME }} - tags: ${{ env.TAG }} - archs: ${{ matrix.container-image-arch }} - containerfiles: | - ./Containerfile - oci: true - - - name: Save container image - run: podman save -o image.tar ${{ env.IMAGE_NAME }}:${{ env.TAG }} + file: Containerfile + tags: ${{ env.IMAGE_NAME }}:${{ env.TAG }} + platforms: linux/${{ matrix.container-image-arch }} + outputs: type=oci,dest=image.tar + + # - name: Build container image + # uses: redhat-actions/buildah-build@v2 + # with: + # image: ${{ env.IMAGE_NAME }} + # tags: ${{ env.TAG }} + # archs: ${{ matrix.container-image-arch }} + # containerfiles: | + # ./Containerfile + # oci: true + # + # - name: Save container image + # run: podman save -o image.tar ${{ env.IMAGE_NAME }}:${{ env.TAG }} - name: Upload container image uses: actions/upload-artifact@v3