Merge pull request #313 from denysvitali/feature/fix-defaults
fix: add default values in vmInput
This commit is contained in:
commit
8245d23e1e
2 changed files with 9 additions and 1 deletions
|
@ -296,6 +296,14 @@ func (sc *StepContext) vmEnv() func(*otto.Otto) {
|
||||||
|
|
||||||
func (sc *StepContext) vmInputs() func(*otto.Otto) {
|
func (sc *StepContext) vmInputs() func(*otto.Otto) {
|
||||||
inputs := make(map[string]string)
|
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 {
|
for k, v := range sc.Step.With {
|
||||||
inputs[k] = v
|
inputs[k] = v
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,6 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/hello-world-docker-action@master
|
- uses: actions/hello-world-docker-action@main
|
||||||
with:
|
with:
|
||||||
who-to-greet: 'Mona the Octocat'
|
who-to-greet: 'Mona the Octocat'
|
||||||
|
|
Loading…
Add table
Reference in a new issue