Do not push if "output" is set

push is just another variant of output and it does not make sense to have both: https://docs.docker.com/engine/reference/commandline/buildx_build/#push
This commit is contained in:
Martin Honermeyer 2022-01-26 23:37:42 +01:00
parent 3bda61ef73
commit 2ff6af4564

View File

@ -84,7 +84,7 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
}
args = append(args, build.Context)
if !dryrun && len(build.Tags.Value()) > 0 {
if !dryrun && build.Output == "" && len(build.Tags.Value()) > 0 {
args = append(args, "--push")
}
if build.Compress {