From 8a6ba6098fb1ee589305359a285d0cec4fc1720a Mon Sep 17 00:00:00 2001 From: Jacob Gillespie Date: Mon, 8 Apr 2024 18:25:08 +0100 Subject: [PATCH] Don't use OCI mediatypes when pushing to Heroku's registry --- pkg/load/cli.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/load/cli.go b/pkg/load/cli.go index ebcc1fbb..d68a46a4 100644 --- a/pkg/load/cli.go +++ b/pkg/load/cli.go @@ -107,7 +107,11 @@ func WithDepotImagePull(buildOpts map[string]build.Options, loadOpts DepotLoadOp export.Attrs["name"] = defaultImageName(loadOpts, target) } - export.Attrs["oci-mediatypes"] = "true" + // Don't use OCI mediatypes if pushing to Heroku's registry. + if !strings.Contains(export.Attrs["name"], "registry.heroku.com") { + export.Attrs["oci-mediatypes"] = "true" + } + export.Attrs["depot.export.lease"] = "true" export.Attrs["depot.export.image.version"] = "2" }