fix: set inputs to an empty map

This commit is contained in:
Michael Kriese 2024-08-22 12:52:07 +02:00
parent 627ef246c6
commit 02ccd9a757
No known key found for this signature in database
GPG key ID: F8D7748549A5986A

View file

@ -196,6 +196,10 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report.
if inputsRaw, ok := preset.Event["inputs"]; ok {
inputs, _ = inputsRaw.(map[string]string)
}
} else {
// If the inputs are not set, make sure it is not nil.
// Otherwise the runner will fail to parse the workflow.
inputs = make(map[string]string)
}
runnerConfig := &runner.Config{