From c34ba8e94cba5e49df9df82028bbc74bf979153f Mon Sep 17 00:00:00 2001 From: Timothy Miller Date: Sun, 28 Feb 2021 16:28:08 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20CI=20Multi-Arch=20Docker=20build?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/image.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 248e325..b7c866f 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -1,4 +1,4 @@ -name: build our image +name: Building cloudflare-ddns Docker image on: push: @@ -11,13 +11,24 @@ jobs: - name: checkout code uses: actions/checkout@v2 # https://github.com/docker/setup-qemu-action - - name: Set up QEMU + - name: Setting up QEMU uses: docker/setup-qemu-action@v1 # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx + - name: Setting up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: build the image + - name: Building the image run: | docker buildx build \ --tag timothyjmiller/cloudflare-ddns:latest \ - --platform linux/ppc64le,linux/s390x,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64 . \ No newline at end of file + --platform linux/ppc64le,linux/s390x,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64 . + - name: Login to DockerHub + run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + + # Reusing the cache, push the images + - name: Run Buildx + run: | + docker buildx build \ + --platform linux/ppc64le,linux/s390x,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64 \ + -t timothyjmiller/cloudflare-ddns:latest \ + . \ + --push \ No newline at end of file