fix: prevent unintended input replacement in reusable workflows with workflow_dispatch when using workflow_call (#2502)
* Remove redundant check See: https://github.com/nektos/act/issues/2464#issuecomment-2430903650 * Add condition to prevent replacing inputs in reusable workflows with workflow_dispatch inputs Closes: https://github.com/nektos/act/issues/2464 * fmt * Revert "Remove redundant check" This reverts commit 63455960ec714eea7631a586bcd59bed449739fc. * add test * Update runner_test.go * update label --------- Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
committed by
GitHub
parent
bd8dda1939
commit
deea8ec8c6
@@ -497,7 +497,7 @@ func getEvaluatorInputs(ctx context.Context, rc *RunContext, step step, ghc *mod
|
||||
}
|
||||
}
|
||||
|
||||
if ghc.EventName == "workflow_dispatch" {
|
||||
if rc.caller == nil && ghc.EventName == "workflow_dispatch" {
|
||||
config := rc.Run.Workflow.WorkflowDispatchConfig()
|
||||
if config != nil && config.Inputs != nil {
|
||||
for k, v := range config.Inputs {
|
||||
|
||||
Reference in New Issue
Block a user