do not try to build or push if no architectures are available
@@ -158,6 +158,14 @@ func pkgBuildPush(args []string, withPush bool) {
pkgPlats = append(pkgPlats, imagespec.Platform{OS: "linux", Architecture: a})
}
}
+
+ // if there are no platforms to build for, do nothing.
+ // note that this is *not* an error; we simply skip it
+ if len(pkgPlats) == 0 {
+ fmt.Printf("Skipping %s with no architectures to build\n", p.Tag())
+ return
+ }
+
pkgOpts = append(pkgOpts, pkglib.WithBuildPlatforms(pkgPlats...))
var msg, action string
