Skip to content

Commit

Permalink
feat!: publish multiarch image (#819)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `containerbase/buildpack` image is no longer published
  • Loading branch information
viceice authored Mar 22, 2023
1 parent 2304e86 commit 070bea8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
23 changes: 11 additions & 12 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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}"
]
}
4 changes: 3 additions & 1 deletion tools/prepare-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 3 additions & 1 deletion tools/publish-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 070bea8

Please sign in to comment.