Interpolate with:
inputs (#511)
This commit is contained in:
parent
22d56c3517
commit
8339f4b404
2 changed files with 3 additions and 2 deletions
|
@ -343,8 +343,9 @@ func (sc *StepContext) vmInputs() func(*otto.Otto) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v := range sc.Step.With {
|
for k, v := range sc.Step.With {
|
||||||
inputs[k] = v
|
inputs[k] = sc.RunContext.NewExpressionEvaluator().Interpolate(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
return func(vm *otto.Otto) {
|
return func(vm *otto.Otto) {
|
||||||
_ = vm.Set("inputs", inputs)
|
_ = vm.Set("inputs", inputs)
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,7 +241,7 @@ func (sc *StepContext) runUsesContainer() common.Executor {
|
||||||
step := sc.Step
|
step := sc.Step
|
||||||
return func(ctx context.Context) error {
|
return func(ctx context.Context) error {
|
||||||
image := strings.TrimPrefix(step.Uses, "docker://")
|
image := strings.TrimPrefix(step.Uses, "docker://")
|
||||||
cmd := strings.Fields(step.With["args"])
|
cmd := strings.Fields(sc.RunContext.NewExpressionEvaluator().Interpolate(step.With["args"]))
|
||||||
entrypoint := strings.Fields(step.With["entrypoint"])
|
entrypoint := strings.Fields(step.With["entrypoint"])
|
||||||
stepContainer := sc.newStepContainer(ctx, image, cmd, entrypoint)
|
stepContainer := sc.newStepContainer(ctx, image, cmd, entrypoint)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue