Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: publish multiarch image #819

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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