update secret interpolation
This commit is contained in:
parent
cbeac5e671
commit
f51a9aed84
1 changed files with 1 additions and 4 deletions
|
@ -97,7 +97,7 @@ func (a *Agent) prep(w *model.Work) (*yaml.Config, error) {
|
|||
envSecrets := map[string]string{}
|
||||
if os.Getenv("DRONE_INTERPOLATE_SECRETS") != "" {
|
||||
for _, secret := range w.Secrets {
|
||||
if w.Verified || secret.SkipVerify {
|
||||
if (w.Verified || secret.SkipVerify) && secret.MatchEvent(w.Build.Event) {
|
||||
envSecrets[secret.Name] = secret.Value
|
||||
}
|
||||
}
|
||||
|
@ -109,9 +109,6 @@ func (a *Agent) prep(w *model.Work) (*yaml.Config, error) {
|
|||
if !ok {
|
||||
env, ok = envs[s]
|
||||
}
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
if strings.Contains(env, "\n") {
|
||||
env = fmt.Sprintf("%q", env)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue