Skip to content

Commit 4a8b4e7

Browse files
committed
Fix deprecations and caching, ensure tags are build from proper Ubuntu release as well
1 parent b505a8e commit 4a8b4e7

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.github/actions/buildx-setup/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: "composite"
66
steps:
77
- name: Set up QEMU
8-
uses: docker/setup-qemu-action@v1
8+
uses: docker/setup-qemu-action@v2
99

1010
- name: Set up Docker Buildx
1111
id: buildx

.github/workflows/master.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ jobs:
6161
with:
6262
path: /tmp/.buildx-cache
6363
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
64-
key: ${{ runner.os }}-buildx-${{ github.sha }}
64+
key: ${{ runner.os }}-alpine-${{ github.sha }}
6565
restore-keys: |
66-
${{ runner.os }}-buildx-
66+
${{ runner.os }}-alpine-
6767
6868
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
6969
run: |
@@ -80,7 +80,7 @@ jobs:
8080
# linux/s390x: "rsyslog (no such package)"
8181
# Latest Alpine does not have all the packages for 386 anymore. :-(
8282
platforms: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
83-
cache-from: type=local,src=/tmp/.buildx-cache/alpine
83+
cache-from: type=local,src=/tmp/.buildx-cache/alpine,mode=max,compression=estargz
8484
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
8585
build-args: |
8686
BASE_IMAGE=alpine:latest
@@ -114,9 +114,9 @@ jobs:
114114
with:
115115
path: /tmp/.buildx-cache
116116
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
117-
key: ${{ runner.os }}-buildx-${{ github.sha }}
117+
key: ${{ runner.os }}-ubuntu-${{ github.sha }}
118118
restore-keys: |
119-
${{ runner.os }}-buildx-
119+
${{ runner.os }}-ubuntu-
120120
121121
- name: Build and push Ubuntu
122122
uses: docker/build-push-action@v4
@@ -125,7 +125,7 @@ jobs:
125125
push: true
126126
tags: boky/postfix:latest-ubuntu
127127
platforms: "linux/arm/v7,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
128-
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu
128+
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu,mode=max,compression=estargz
129129
cache-to: type=local,dest=/tmp/.buildx-cache-new/ubuntu
130130
build-args: |
131131
BASE_IMAGE=ubuntu:jammy

.github/workflows/pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
with:
5757
path: /tmp/.buildx-cache
5858
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
59-
key: ${{ runner.os }}-buildx-${{ github.sha }}
59+
key: ${{ runner.os }}-alpine-${{ github.sha }}
6060
restore-keys: |
61-
${{ runner.os }}-buildx-
61+
${{ runner.os }}-alpine-
6262
6363
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
6464
run: |

.github/workflows/tags.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ jobs:
6363
with:
6464
path: /tmp/.buildx-cache
6565
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
66-
key: ${{ runner.os }}-buildx-${{ github.sha }}
66+
key: ${{ runner.os }}-alpine-${{ github.sha }}
6767
restore-keys: |
68-
${{ runner.os }}-buildx-
68+
${{ runner.os }}-alpine-
6969
7070
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
7171
run: |
@@ -82,7 +82,7 @@ jobs:
8282
# linux/s390x: "rsyslog (no such package)"
8383
# Latest Alpine does not have all packages for 386 any more :-(
8484
platforms: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
85-
cache-from: type=local,src=/tmp/.buildx-cache/alpine
85+
cache-from: type=local,src=/tmp/.buildx-cache/alpine,mode=max,compression=estargz
8686
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
8787
build-args: |
8888
BASE_IMAGE=alpine:latest
@@ -118,9 +118,9 @@ jobs:
118118
with:
119119
path: /tmp/.buildx-cache
120120
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
121-
key: ${{ runner.os }}-buildx-${{ github.sha }}
121+
key: ${{ runner.os }}-ubuntu-${{ github.sha }}
122122
restore-keys: |
123-
${{ runner.os }}-buildx-
123+
${{ runner.os }}-ubuntu-
124124
125125
- name: Build and push Ubuntu
126126
uses: docker/build-push-action@v4
@@ -129,10 +129,10 @@ jobs:
129129
push: true
130130
tags: boky/postfix:${{ env.RELEASE_VERSION }}-ubuntu
131131
platforms: "linux/arm/v7,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
132-
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu
132+
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu,mode=max,compression=estargz
133133
cache-to: type=local,dest=/tmp/.buildx-cache-new/ubuntu
134134
build-args: |
135-
BASE_IMAGE=ubuntu:impish
135+
BASE_IMAGE=ubuntu:jammy
136136
137137
- name: Move cache
138138
run: |

0 commit comments

Comments
 (0)