Publish as single multi-arch Docker image

This commit bundles the `notification-controller:$VER-arm64` ARM image
tag range that was previously released separately with the
`notification-controller:$VER` image, as GitHub now provides us
insights into image layer statistics.

Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
Hidde Beydals 2021-01-11 13:10:47 +01:00
parent 462c65dc73
commit 66cb3e5b8f
1 changed files with 2 additions and 20 deletions

View File

@ -47,14 +47,14 @@ jobs:
with: with:
username: fluxcdbot username: fluxcdbot
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }} password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
- name: Publish AMD64 image - name: Publish multi-arch container image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
push: true push: true
builder: ${{ steps.buildx.outputs.name }} builder: ${{ steps.buildx.outputs.name }}
context: . context: .
file: ./Dockerfile file: ./Dockerfile
platforms: linux/amd64 platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: | tags: |
ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
@ -65,28 +65,10 @@ jobs:
org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }} org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }}
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }} org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
- name: Publish ARM image
uses: docker/build-push-action@v2
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/arm/v7,linux/arm64
tags: |
ghcr.io/fluxcd/notification-controller-arm64:${{ steps.prep.outputs.VERSION }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }}
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
- name: Check images - name: Check images
run: | run: |
docker buildx imagetools inspect docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} docker buildx imagetools inspect docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
docker buildx imagetools inspect ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} docker buildx imagetools inspect ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
docker buildx imagetools inspect ghcr.io/fluxcd/notification-controller-arm64:${{ steps.prep.outputs.VERSION }}
docker pull docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} docker pull docker.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
docker pull ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }} docker pull ghcr.io/fluxcd/notification-controller:${{ steps.prep.outputs.VERSION }}
- name: Create release - name: Create release