From c2202d947fae4b9ca84e6bf09f761143d5e01d6e Mon Sep 17 00:00:00 2001 From: Valentin Heiserer Date: Tue, 26 Aug 2025 00:24:09 +0200 Subject: [PATCH] fix: update Docker workflow to include QEMU and Buildx setup, and upgrade build-push action to v6 --- .github/workflows/BuildAndPushCotnainer.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/BuildAndPushCotnainer.yml b/.github/workflows/BuildAndPushCotnainer.yml index 93d1492..71c1818 100644 --- a/.github/workflows/BuildAndPushCotnainer.yml +++ b/.github/workflows/BuildAndPushCotnainer.yml @@ -21,6 +21,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: @@ -34,16 +40,16 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | + type=raw,value=latest,enable={{is_default_branch}} type=sha,format=short type=ref,event=branch - - name: Build and push Docker image - uses: docker/build-push-action@v5 + - name: Build and push Docker image (multi-arch) + uses: docker/build-push-action@v6 with: context: ./frontend file: ./frontend/Dockerfile push: true - # Always push the normal tags; if this is a main push, - # prepend "latest" to the list. - tags: ${{ github.ref == 'refs/heads/main' && format('{0},latest', steps.meta.outputs.tags) || steps.meta.outputs.tags }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file