Skip to content

Commit

Permalink
Upd: Simplify GitHub actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed May 29, 2021
1 parent bc84df9 commit 4476cba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,21 @@ jobs:
username: 'boky'
password: '${{ secrets.DOCKER_ACCESS_TOKEN }}'

- name: Build and push unmarked release
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: boky/postfix:latest
platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le" # linux/s390x: "rsyslog (no such package)"
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
update-binfmts --enable
- name: Build and push Alpine
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: boky/postfix:latest-alpine
tags: |
boky/postfix:latest
boky/postfix:latest-alpine
platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le" # linux/s390x: "rsyslog (no such package)"
cache-from: type=local,src=/tmp/.buildx-cache-new/alpine
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,21 @@ jobs:
username: 'boky'
password: '${{ secrets.DOCKER_ACCESS_TOKEN }}'

- name: Build and push unmarked release
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: boky/postfix:$RELEASE_VERSION
platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le" # linux/s390x: "rsyslog (no such package)"
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
- name: Fix issue with building Alpine # See https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
run: |
update-binfmts --enable
- name: Build and push Alpine
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: boky/postfix:$RELEASE_VERSION-alpine
tags: |
boky/postfix:${{ env.RELEASE_VERSION }}
boky/postfix:${{ env.RELEASE_VERSION }}-alpine
platforms: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le" # linux/s390x: "rsyslog (no such package)"
cache-from: type=local,src=/tmp/.buildx-cache-new/alpine
cache-from: type=local,src=/tmp/.buildx-cache/alpine
cache-to: type=local,dest=/tmp/.buildx-cache-new/alpine
build-args: |
BASE_IMAGE=alpine:latest
Expand All @@ -111,7 +106,7 @@ jobs:
with:
context: .
push: true
tags: boky/postfix:$RELEASE_VERSION-ubuntu
tags: boky/postfix:${{ env.RELEASE_VERSION }}-ubuntu
platforms: "linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x"
cache-from: type=local,src=/tmp/.buildx-cache/ubuntu
cache-to: type=local,dest=/tmp/.buildx-cache-new/ubuntu
Expand Down

0 comments on commit 4476cba

Please sign in to comment.