master workflow, builds amd64-only :latest and :latest-debug

- arm64 via qemu is waaay too slow
- tags are still multiarch
pull/52/head
Ricardo Pardini 2020-10-08 15:37:41 +02:00
parent 10bac0816b
commit 1fc3dfed4a
1 changed files with 2 additions and 38 deletions

View File

@ -12,14 +12,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
# Setup qEMU for arm64
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: arm64
# We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions's cache
# Also buildx offers multi-arch builds
# We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions' cache
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
@ -54,7 +47,7 @@ jobs:
tags: rpardini/docker-registry-proxy:latest
push: true
cache-from: type=local,src=/tmp/.buildx-cache/release
# first run does not export the cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release
- name: Build and push amd64 Debug Docker Image to DockerHub
uses: docker/build-push-action@v2
@ -67,33 +60,4 @@ jobs:
tags: rpardini/docker-registry-proxy:latest-debug
push: true
cache-from: type=local,src=/tmp/.buildx-cache/debug
# first run does not export the cache
# Do it all again with both archs. the amd64 will be a huge cache hit
# this will update the manifest have both arches
- name: Build and push multiarch Release Docker Image to DockerHub
uses: docker/build-push-action@v2
with:
build-args: DEBUG_BUILD=0,BASE_IMAGE_SUFFIX=
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
tags: rpardini/docker-registry-proxy:latest
push: true
cache-from: type=local,src=/tmp/.buildx-cache/release
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release
- name: Build and push multiarch Debug Docker Image to DockerHub
uses: docker/build-push-action@v2
with:
build-args: DEBUG_BUILD=1,BASE_IMAGE_SUFFIX=-debug
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/arm64,linux/amd64
tags: rpardini/docker-registry-proxy:latest-debug
push: true
cache-from: type=local,src=/tmp/.buildx-cache/debug
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/debug