fix: allow multi-platform builds using --push flag (#29)
This commit is contained in:
@@ -65,7 +65,6 @@ func commandBuild(build Build) *exec.Cmd {
|
||||
args := []string{
|
||||
"buildx",
|
||||
"build",
|
||||
"--load",
|
||||
"--rm=true",
|
||||
"-f", build.Dockerfile,
|
||||
"-t", build.Name,
|
||||
@@ -107,6 +106,12 @@ func commandBuild(build Build) *exec.Cmd {
|
||||
args = append(args, "--quiet")
|
||||
}
|
||||
|
||||
if len(build.Platforms.Value()) > 1 {
|
||||
args = append(args, "--push")
|
||||
} else {
|
||||
args = append(args, "--load")
|
||||
}
|
||||
|
||||
if len(build.Platforms.Value()) > 0 {
|
||||
args = append(args, "--platform", strings.Join(build.Platforms.Value()[:], ","))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user