From 8aa35b7ac71e56dacee9410983fa6f0202b5ac1f Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 28 Jan 2024 10:33:24 +0100 Subject: [PATCH] Fix the final image publishing --- .github/workflows/publish.yml | 25 +++++++++++++++---------- Makefile | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bd2ad60..c9f5ffa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,17 +47,22 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - #- name: Build and push image - # run: make build-alpine - # env: - # DOCKER_BUILDKIT: 1 - # ACTION: push - # PLATFORM: "${{ matrix.platform }}" - # IMAGE_TAG: "docker.io/hickorydns/hickory-dns:${{ matrix.platform-tag }}-latest" + - name: Build and push image + run: make build-alpine + env: + DOCKER_BUILDKIT: 1 + ACTION: push + PLATFORM: "${{ matrix.platform }}" + IMAGE_TAG: "docker.io/hickorydns/hickory-dns:${{ matrix.platform-tag }}-latest" + # Disable provenance to remove the attestation from the pushed image + # See: https://github.com/docker/buildx/issues/1509 + # It makes: docker.io/botsudo/docker-rustpython:-latest a manifest list + # And docker manifest create does not like that + EXTRA_ARGS: "--provenance=false" - #- name: Test docker image - # if: ${{ matrix.platform == 'linux/amd64' }} - # run: make test-alpine + - name: Test docker image + if: ${{ matrix.platform == 'linux/amd64' }} + run: make test-alpine build-and-push-manifest: name: Build and push the docker hub manifest diff --git a/Makefile b/Makefile index e595ae2..50261c8 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ BUILD_ARGS ?= PLATFORM ?= linux/amd64 ACTION ?= load PROGRESS_MODE ?= plain +EXTRA_ARGS ?= ## -- helpers for ENVs possibly used in BUILD_ARGS (manual builds), see README VERSION ?= @@ -42,6 +43,7 @@ build-alpine: --platform $(PLATFORM) \ --pull \ ${BUILD_ARGS} \ + $(EXTRA_ARGS) \ --$(ACTION) \ ./alpine