Allow using key-value data

This commit is contained in:
2023-10-08 16:01:53 +02:00
parent 0f0aba7f82
commit b34ee789bc
3 changed files with 27 additions and 4 deletions

View File

@@ -159,11 +159,11 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
Value: true,
Destination: &settings.Build.LabelsAuto,
},
&cli.StringSliceFlag{
&cli.StringFlag{
Name: "args",
EnvVars: []string{"PLUGIN_BUILD_ARGS"},
Usage: "sets custom build arguments for the build",
Destination: &settings.Build.Args,
Usage: "sets custom build arguments for the build. Must be a JSON string",
Destination: &settings.Build.ArgsRaw,
},
&cli.StringSliceFlag{
Name: "args-from-env",

View File

@@ -19,7 +19,7 @@ func main() {
if _, err := os.Stat("/run/drone/env"); err == nil {
godotenv.Overload("/run/drone/env")
}
if envFile, set := os.LookupEnv("PLUGIN_ENV_FILE"); set {
godotenv.Overload(envFile)
}