Skip to content

Commit

Permalink
Fix deprecations and caching, ensure tags are build from proper Ubunt…
Browse files Browse the repository at this point in the history
…u release as well
  • Loading branch information
bokysan committed Feb 10, 2023
1 parent b505a8e commit 4a8b4e7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/buildx-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
id: buildx
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-alpine-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-alpine-
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
Expand All @@ -80,7 +80,7 @@ jobs:
# linux/s390x: "rsyslog (no such package)"
# Latest Alpine does not have all the packages for 386 anymore. :-(
platforms: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-from: type=local,src=/tmp/.buildx-cache/alpine,mode=max,compression=estargz
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
Expand Down Expand Up @@ -114,9 +114,9 @@ jobs:
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-ubuntu-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-ubuntu-
- name: Build and push Ubuntu
uses: docker/build-push-action@v4
Expand All @@ -125,7 +125,7 @@ jobs:
push: true
tags: boky/postfix:latest-ubuntu
platforms: "linux/arm/v7,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu,mode=max,compression=estargz
cache-to: type=local,dest=/tmp/.buildx-cache-new/ubuntu
build-args: |
BASE_IMAGE=ubuntu:jammy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-alpine-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-alpine-
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-alpine-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-alpine-
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
Expand All @@ -82,7 +82,7 @@ jobs:
# linux/s390x: "rsyslog (no such package)"
# Latest Alpine does not have all packages for 386 any more :-(
platforms: "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-from: type=local,src=/tmp/.buildx-cache/alpine,mode=max,compression=estargz
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
Expand Down Expand Up @@ -118,9 +118,9 @@ jobs:
with:
path: /tmp/.buildx-cache
#key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
key: ${{ runner.os }}-ubuntu-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
${{ runner.os }}-ubuntu-
- name: Build and push Ubuntu
uses: docker/build-push-action@v4
Expand All @@ -129,10 +129,10 @@ jobs:
push: true
tags: boky/postfix:${{ env.RELEASE_VERSION }}-ubuntu
platforms: "linux/arm/v7,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x"
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu,mode=max,compression=estargz
cache-to: type=local,dest=/tmp/.buildx-cache-new/ubuntu
build-args: |
BASE_IMAGE=ubuntu:impish
BASE_IMAGE=ubuntu:jammy
- name: Move cache
run: |
Expand Down

0 comments on commit 4a8b4e7

Please sign in to comment.