Allow using key-value data
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user