Implement option to add image labels and generate automatic labels (#19)
Fixes #16 Results into labels:  Co-authored-by: Lauris BH <lauris@nix.lv> Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/19 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org> Co-committed-by: Lauris BH <lafriks@noreply.codeberg.org>
This commit is contained in:
@@ -126,6 +126,10 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
|
||||
args = append(args, "-t", fmt.Sprintf("%s:%s", build.Repo, arg))
|
||||
}
|
||||
|
||||
for _, l := range build.Labels.Value() {
|
||||
args = append(args, "--label", l)
|
||||
}
|
||||
|
||||
return exec.Command(dockerExe, args...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user