1111 steps :
1212
1313 - name : Checkout
14- uses : actions/checkout@v2
14+ uses : actions/checkout@v4
1515
1616 # Parse the ref to get the clean tag name.
1717 - id : get_version
@@ -20,33 +20,24 @@ jobs:
2020
2121 # Setup qEMU for arm64
2222 - name : Set up QEMU
23- uses : docker/setup-qemu-action@v1
23+ uses : docker/setup-qemu-action@v3
2424 with :
2525 platforms : arm64
2626
2727 # We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions's cache
2828 # Also buildx offers multi-arch builds
2929 - name : Set up Docker Buildx
3030 id : buildx
31- uses : docker/setup-buildx-action@v1
32-
33- # Setup the Github Actions cache.
34- - name : Cache Docker layers
35- uses : actions/cache@v2
36- with :
37- path : /tmp/.buildx-cache
38- key : ${{ runner.os }}-buildxarch-${{ github.sha }}
39- restore-keys : |
40- ${{ runner.os }}-buildxarch-
31+ uses : docker/setup-buildx-action@v3
4132
4233 - name : Docker Login to DockerHub
43- uses : docker/login-action@v1
34+ uses : docker/login-action@v3
4435 with :
4536 username : ${{ secrets.DOCKER_HUB_USERNAME }}
4637 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
4738
4839 - name : Docker Login to GitHub Container Registry
49- uses : docker/login-action@v1
40+ uses : docker/login-action@v3
5041 with :
5142 registry : ghcr.io
5243 username : ${{ github.repository_owner }} # github username or org
5748 # could result in pull failures or inconsistencies for arm64, such is life.
5849 # further duplicated by building both release and debug builds
5950 - name : Build and push amd64 Release Docker Image to DockerHub/GitHub CR
60- uses : docker/build-push-action@v2
51+ uses : docker/build-push-action@v6
6152 with :
6253 build-args : |
6354 DEBUG_BUILD=0
@@ -66,13 +57,11 @@ jobs:
6657 context : .
6758 file : ./Dockerfile
6859 platforms : linux/amd64
69- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }},ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
60+ tags : rpardini/docker-registry-proxy:amd64- ${{ steps.get_version.outputs.version }},ghcr.io/rpardini/docker-registry-proxy:amd64- ${{ steps.get_version.outputs.version }}
7061 push : true
71- cache-from : type=local,src=/tmp/.buildx-cache/release
72- # first run does not export the cache
7362
7463 - name : Build and push amd64 Debug Docker Image to DockerHub/GitHub CR
75- uses : docker/build-push-action@v2
64+ uses : docker/build-push-action@v6
7665 with :
7766 build-args : |
7867 DEBUG_BUILD=1
@@ -81,15 +70,13 @@ jobs:
8170 context : .
8271 file : ./Dockerfile
8372 platforms : linux/amd64
84- tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug,ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
73+ tags : rpardini/docker-registry-proxy:amd64- ${{ steps.get_version.outputs.version }}-debug,ghcr.io/rpardini/docker-registry-proxy:amd64- ${{ steps.get_version.outputs.version }}-debug
8574 push : true
86- cache-from : type=local,src=/tmp/.buildx-cache/debug
87- # first run does not export the cache
8875
8976 # Do it all again with both archs. the amd64 will be a huge cache hit
9077 # this will update the manifest have both arches
9178 - name : Build and push multiarch Release Docker Image to DockerHub/GitHub CR
92- uses : docker/build-push-action@v2
79+ uses : docker/build-push-action@v6
9380 with :
9481 build-args : |
9582 DEBUG_BUILD=0
@@ -100,11 +87,9 @@ jobs:
10087 platforms : linux/arm64,linux/amd64
10188 tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }},ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}
10289 push : true
103- cache-from : type=local,src=/tmp/.buildx-cache/release
104- cache-to : type=local,mode=max,dest=/tmp/.buildx-cache/release
10590
10691 - name : Build and push multiarch Debug Docker Image to DockerHub/GitHub CR
107- uses : docker/build-push-action@v2
92+ uses : docker/build-push-action@v6
10893 with :
10994 build-args : |
11095 DEBUG_BUILD=1
@@ -115,6 +100,4 @@ jobs:
115100 platforms : linux/arm64,linux/amd64
116101 tags : rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug,ghcr.io/rpardini/docker-registry-proxy:${{ steps.get_version.outputs.version }}-debug
117102 push : true
118- cache-from : type=local,src=/tmp/.buildx-cache/debug
119- cache-to : type=local,mode=max,dest=/tmp/.buildx-cache/debug
120103
0 commit comments