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