From b9edf34b3c1cacf9d0588980610cf93a3fe0188c Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 22 Mar 2023 13:45:54 +0100 Subject: [PATCH] feat!: publish multiarch image BREAKING CHANGE: `containerbase/buildpack` is no longer published --- docker-bake.hcl | 23 +++++++++++------------ tools/prepare-release.js | 4 +++- tools/publish-release.js | 4 +++- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 783a9d5280..e63b4db362 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -32,7 +32,7 @@ group "default" { } group "push" { - targets = ["push-ghcr", "push-hub", "push-legacy", "push-cache"] + targets = ["push-ghcr", "push-hub", "push-cache"] } group "test" { @@ -71,6 +71,16 @@ target "push-cache" { cache-to = ["type=inline,mode=max"] } +target "build" { + inherits = ["settings", "cache"] + tags = [ + "ghcr.io/${OWNER}/${FILE}", + "ghcr.io/${OWNER}/${FILE}:${TAG}", + "${OWNER}/${FILE}:${TAG}", + "${OWNER}/${FILE}" + ] +} + target "build-docker" { inherits = ["settings", "cache"] output = ["type=docker"] @@ -114,14 +124,3 @@ target "push-hub" { tags = ["${OWNER}/${FILE}", "${OWNER}/${FILE}:${TAG}"] } -// TODO: remove on next major -target "push-legacy" { - inherits = ["settings", "cache"] - output = ["type=registry"] - tags = [ - "ghcr.io/${OWNER}/buildpack", - "ghcr.io/${OWNER}/buildpack:${TAG}", - "${OWNER}/buildpack", - "${OWNER}/buildpack:${TAG}" - ] -} diff --git a/tools/prepare-release.js b/tools/prepare-release.js index ecbb77aa62..1b85aca888 100644 --- a/tools/prepare-release.js +++ b/tools/prepare-release.js @@ -17,7 +17,9 @@ if (r.code) { shell.exit(1); } -r = shell.exec('docker buildx bake --progress plain'); +r = shell.exec( + 'docker buildx bake --progress plain --set settings.platform=linux/amd64,linux/arm64 build' +); if (r.code) { shell.exit(1); } diff --git a/tools/publish-release.js b/tools/publish-release.js index 994e727c72..c62ff9c98a 100644 --- a/tools/publish-release.js +++ b/tools/publish-release.js @@ -16,7 +16,9 @@ if (dry) { shell.echo('Pushing docker images'); -r = shell.exec('docker buildx bake --progress plain --provenance=false push'); +r = shell.exec( + 'docker buildx bake --progress plain --provenance=false --set settings.platform=linux/amd64,linux/arm64 push' +); if (r.code) { shell.exit(1); }