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:
@@ -133,6 +133,19 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
||||
Usage: "generates tag names with the given suffix",
|
||||
Destination: &settings.Build.TagsSuffix,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "labels",
|
||||
EnvVars: []string{"PLUGIN_LABEL", "PLUGIN_LABELS"},
|
||||
Usage: "sets labels to use for the image",
|
||||
Destination: &settings.Build.Labels,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "labels.auto",
|
||||
EnvVars: []string{"PLUGIN_DEFAULT_LABELS", "PLUGIN_AUTO_LABEL"},
|
||||
Usage: "generates labels automatically based on git repository info",
|
||||
Value: true,
|
||||
Destination: &settings.Build.LabelsAuto,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "args",
|
||||
EnvVars: []string{"PLUGIN_BUILD_ARGS"},
|
||||
|
||||
Reference in New Issue
Block a user