Skip to content

Commit 56cb4db

Browse files
committed
gha: master/tags: bump actions, drop caching
1 parent b225f91 commit 56cb4db

File tree

2 files changed

+19
-49
lines changed

2 files changed

+19
-49
lines changed

.github/workflows/master-latest.yaml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,21 @@ jobs:
1010
steps:
1111

1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414

1515
# We use buildx instead of regular build so we can take advantage of Docker layer cache via GithubActions' cache
1616
- name: Set up Docker Buildx
1717
id: buildx
18-
uses: docker/setup-buildx-action@v1
19-
20-
# Setup the Github Actions cache.
21-
- name: Cache Docker layers
22-
uses: actions/cache@v2
23-
with:
24-
path: /tmp/.buildx-cache
25-
key: ${{ runner.os }}-buildxarch-${{ github.sha }}
26-
restore-keys: |
27-
${{ runner.os }}-buildxarch-
18+
uses: docker/setup-buildx-action@v3
2819

2920
- name: Docker Login to DockerHub
30-
uses: docker/login-action@v1
21+
uses: docker/login-action@v3
3122
with:
3223
username: ${{ secrets.DOCKER_HUB_USERNAME }}
3324
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
3425

3526
- name: Docker Login to GitHub Container Registry
36-
uses: docker/login-action@v1
27+
uses: docker/login-action@v3
3728
with:
3829
registry: ghcr.io
3930
username: ${{ github.repository_owner }} # github username or org
@@ -44,7 +35,7 @@ jobs:
4435
# could result in pull failures or inconsistencies for arm64, such is life.
4536
# further duplicated by building both release and debug builds
4637
- name: Build and push amd64 Release Docker Image to DockerHub/GitHub CR
47-
uses: docker/build-push-action@v2
38+
uses: docker/build-push-action@v6
4839
with:
4940
build-args: |
5041
DEBUG_BUILD=0
@@ -53,13 +44,11 @@ jobs:
5344
context: .
5445
file: ./Dockerfile
5546
platforms: linux/amd64
56-
tags: rpardini/docker-registry-proxy:latest,ghcr.io/rpardini/docker-registry-proxy:latest
47+
tags: rpardini/docker-registry-proxy:amd64-latest,ghcr.io/rpardini/docker-registry-proxy:amd64-latest
5748
push: true
58-
cache-from: type=local,src=/tmp/.buildx-cache/release
59-
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/release
6049

6150
- name: Build and push amd64 Debug Docker Image to DockerHub/GitHub CR
62-
uses: docker/build-push-action@v2
51+
uses: docker/build-push-action@v6
6352
with:
6453
build-args: |
6554
DEBUG_BUILD=1
@@ -68,7 +57,5 @@ jobs:
6857
context: .
6958
file: ./Dockerfile
7059
platforms: linux/amd64
71-
tags: rpardini/docker-registry-proxy:latest-debug,ghcr.io/rpardini/docker-registry-proxy:latest-debug
60+
tags: rpardini/docker-registry-proxy:amd64-latest-debug,ghcr.io/rpardini/docker-registry-proxy:amd64-latest-debug
7261
push: true
73-
cache-from: type=local,src=/tmp/.buildx-cache/debug
74-
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache/debug

.github/workflows/tags.yaml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
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
@@ -57,7 +48,7 @@ jobs:
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

Comments
 (0)