diff --git a/pipeline/docker/docker.go b/pipeline/docker/docker.go index 28a6dd089..b6bb9e011 100644 --- a/pipeline/docker/docker.go +++ b/pipeline/docker/docker.go @@ -80,7 +80,7 @@ func process(ctx *context.Context, folder string, docker config.Docker, binary c } } - // TODO: improve this so it can log into to stdout + // TODO: improve this so it can log it to stdout if !ctx.Publish { return pipeline.Skip("--skip-publish is set") } @@ -90,13 +90,14 @@ func process(ctx *context.Context, folder string, docker config.Docker, binary c if err := dockerPush(image); err != nil { return err } - if docker.Latest { - if err := dockerTag(image, latest); err != nil { - return err - } - } ctx.AddDocker(image) - return nil + if !docker.Latest { + return nil + } + if err := dockerTag(image, latest); err != nil { + return err + } + return dockerPush(latest) } func dockerBuild(root, dockerfile, image string) error {