From eafedba51b81335122737e39ff80e52ddba2d3e6 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 30 Oct 2020 12:56:22 +0100 Subject: [PATCH] GitHub Actions: publish :latest and :latest-debug also to GitHub Container Registry - DockerHub is ok, but will be ratelimited soon, so this could be a nice alternative --- .github/workflows/master-latest.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master-latest.yaml b/.github/workflows/master-latest.yaml index bcefbdc..2eafc63 100644 --- a/.github/workflows/master-latest.yaml +++ b/.github/workflows/master-latest.yaml @@ -26,12 +26,19 @@ jobs: restore-keys: | ${{ runner.os }}-buildxarch- - - name: Login to DockerHub + - name: Docker Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Docker Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ secrets.DOCKER_GITHUB_USERNAME }} + password: ${{ secrets.DOCKER_GITHUB_PAT }} + # the arm64 is of course much slower due to qemu, so build and push amd64 **first** # due to the way manifests work, the gap between this and the complete push below # could result in pull failures or inconsistencies for arm64, such is life. @@ -46,7 +53,7 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64 - tags: rpardini/docker-registry-proxy:latest + tags: rpardini/docker-registry-proxy:latest,ghcr.io/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 @@ -61,7 +68,7 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64 - tags: rpardini/docker-registry-proxy:latest-debug + tags: rpardini/docker-registry-proxy:latest-debug,ghcr.io/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