@@ -39,17 +39,24 @@ jobs:
3939 restore-keys : |
4040 ${{ runner.os }}-buildxarch-
4141
42- - name : Login to DockerHub
42+ - name : Docker Login to DockerHub
4343 uses : docker/login-action@v1
4444 with :
4545 username : ${{ secrets.DOCKER_HUB_USERNAME }}
4646 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
4747
48+ - name : Docker Login to GitHub Container Registry
49+ uses : docker/login-action@v1
50+ with :
51+ registry : ghcr.io
52+ username : ${{ secrets.DOCKER_GITHUB_USERNAME }}
53+ password : ${{ secrets.DOCKER_GITHUB_PAT }}
54+
4855 # the arm64 is of course much slower due to qemu, so build and push amd64 **first**
4956 # due to the way manifests work, the gap between this and the complete push below
5057 # could result in pull failures or inconsistencies for arm64, such is life.
5158 # further duplicated by building both release and debug builds
52- - name : Build and push amd64 Release Docker Image to DockerHub
59+ - name : Build and push amd64 Release Docker Image to DockerHub/GitHub CR
5360 uses : docker/build-push-action@v2
5461 with :
5562 build-args : |
@@ -59,12 +66,12 @@ jobs:
5966 context : .
6067 file : ./Dockerfile
6168 platforms : linux/amd64
62- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
69+ tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }},ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
6370 push : true
6471 cache-from : type=local,src=/tmp/.buildx-cache/release
6572 # first run does not export the cache
6673
67- - name : Build and push amd64 Debug Docker Image to DockerHub
74+ - name : Build and push amd64 Debug Docker Image to DockerHub/GitHub CR
6875 uses : docker/build-push-action@v2
6976 with :
7077 build-args : |
@@ -74,14 +81,14 @@ jobs:
7481 context : .
7582 file : ./Dockerfile
7683 platforms : linux/amd64
77- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
84+ tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug,ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
7885 push : true
7986 cache-from : type=local,src=/tmp/.buildx-cache/debug
8087 # first run does not export the cache
8188
8289 # Do it all again with both archs. the amd64 will be a huge cache hit
8390 # this will update the manifest have both arches
84- - name : Build and push multiarch Release Docker Image to DockerHub
91+ - name : Build and push multiarch Release Docker Image to DockerHub/GitHub CR
8592 uses : docker/build-push-action@v2
8693 with :
8794 build-args : |
@@ -91,12 +98,12 @@ jobs:
9198 context : .
9299 file : ./Dockerfile
93100 platforms : linux/arm64,linux/amd64
94- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
101+ tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }},ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
95102 push : true
96103 cache-from : type=local,src=/tmp/.buildx-cache/release
97104 cache-to : type=local,mode=max,dest=/tmp/.buildx-cache/release
98105
99- - name : Build and push multiarch Debug Docker Image to DockerHub
106+ - name : Build and push multiarch Debug Docker Image to DockerHub/GitHub CR
100107 uses : docker/build-push-action@v2
101108 with :
102109 build-args : |
@@ -106,7 +113,7 @@ jobs:
106113 context : .
107114 file : ./Dockerfile
108115 platforms : linux/arm64,linux/amd64
109- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
116+ tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug,ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
110117 push : true
111118 cache-from : type=local,src=/tmp/.buildx-cache/debug
112119 cache-to : type=local,mode=max,dest=/tmp/.buildx-cache/debug
0 commit comments