From a137d7ebb9224f5b0e5728654985b73eec0d72b5 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 18 Jun 2022 23:05:50 -0700 Subject: [PATCH] Support multi-platform docker builds with qemu --- .github/workflows/docker-nightly-earthly.yaml | 7 +++++++ build/release/docker-nightly-earthly.sh | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-nightly-earthly.yaml b/.github/workflows/docker-nightly-earthly.yaml index 5dc492248..7d709908c 100644 --- a/.github/workflows/docker-nightly-earthly.yaml +++ b/.github/workflows/docker-nightly-earthly.yaml @@ -24,6 +24,13 @@ jobs: run: echo "${{ secrets.GH_CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin if: env.GH_CR_PAT != null + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + with: + image: tonistiigi/binfmt:latest + platforms: all + - uses: actions/checkout@v3 - name: Checkout and build if: env.GH_CR_PAT != null diff --git a/build/release/docker-nightly-earthly.sh b/build/release/docker-nightly-earthly.sh index 142af1d13..82d00a2d4 100755 --- a/build/release/docker-nightly-earthly.sh +++ b/build/release/docker-nightly-earthly.sh @@ -11,6 +11,4 @@ echo "Building Docker image ${DOCKER_IMAGE}..." # Change to the root directory of the repository cd $(git rev-parse --show-toplevel) -earthly --ci --push +docker --image="ghcr.io/owncast/${DOCKER_IMAGE}" --tag=nightly --version=${VERSION} - -# docker push ghcr.io/owncast/${DOCKER_IMAGE}:nightly +earthly --ci --push +docker-all --image="ghcr.io/owncast/${DOCKER_IMAGE}" --tag=nightly --version="${VERSION}"