From 11027e3487a871bfc67d59c29b8293bb1e6d28e9 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Thu, 10 Aug 2023 12:42:56 -0400 Subject: [PATCH] self hosted docker builds attempted fix (#4603) --- .github/workflows/docker.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ee0c1e78684..ae1b6f45aaf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -103,17 +103,22 @@ jobs: - name: Set modernity suffix if: endsWith(matrix.binary, '-portable') != true run: echo "MODERNITY_SUFFIX=-modern" >> $GITHUB_ENV; - # Install dependencies for emulation. Have to create a new builder to pick up emulation support. - - name: Build Dockerfile and push - run: | - docker run --privileged --rm tonistiigi/binfmt --install ${SHORT_ARCH} - docker buildx create --use --name cross-builder - docker buildx build \ - --platform=linux/${SHORT_ARCH} \ - --file ./Dockerfile.cross . \ - --tag ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX}${MODERNITY_SUFFIX}${FEATURE_SUFFIX} \ - --provenance=false \ - --push + + - name: Install QEMU + run: sudo apt-get update && sudo apt-get install -y qemu-user-static + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push + uses: docker/build-push-action@v4 + with: + file: ./Dockerfile.cross + context: . + platforms: linux/${SHORT_ARCH} + push: true + tags: ${IMAGE_NAME}:${VERSION}-${SHORT_ARCH}${VERSION_SUFFIX}${MODERNITY_SUFFIX}${FEATURE_SUFFIX} + build-docker-multiarch: name: build-docker-multiarch${{ matrix.modernity }} runs-on: ubuntu-22.04