1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-06 17:40:58 +00:00

fix: add default values in vmInput

This commit is contained in:
Denys Vitali 2020-07-20 21:17:12 +02:00
parent 82f979b8b9
commit e37c3699ff

View file

@ -296,6 +296,14 @@ func (sc *StepContext) vmEnv() func(*otto.Otto) {
func (sc *StepContext) vmInputs() func(*otto.Otto) {
inputs := make(map[string]string)
// Set Defaults
if sc.Action != nil {
for k, input := range sc.Action.Inputs {
inputs[k] = input.Default
}
}
for k, v := range sc.Step.With {
inputs[k] = v
}