mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
Switch to interface{}
instead of map[string]...
(#700)
* fix: change `env` to be an interface allows to use GitHub functions like `fromJson()` * fix: change matrix to an interface instead of map This allows to use GitHub functions like `fromJson()` to create dynamic matrixes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
acfb866a8b
commit
3ecbd94d96
3 changed files with 76 additions and 20 deletions
|
@ -574,13 +574,15 @@ func (sc *StepContext) execAsComposite(ctx context.Context, step *model.Step, _
|
|||
stepClone.Env = make(map[string]string)
|
||||
}
|
||||
actionPath := filepath.Join(containerActionDir, actionName)
|
||||
stepClone.Env["GITHUB_ACTION_PATH"] = actionPath
|
||||
|
||||
env := stepClone.Environment()
|
||||
env["GITHUB_ACTION_PATH"] = actionPath
|
||||
stepClone.Run = strings.ReplaceAll(stepClone.Run, "${{ github.action_path }}", actionPath)
|
||||
|
||||
stepContext := StepContext{
|
||||
RunContext: rcClone,
|
||||
Step: &stepClone,
|
||||
Env: mergeMaps(sc.Env, stepClone.Env),
|
||||
Env: mergeMaps(sc.Env, env),
|
||||
}
|
||||
|
||||
// Interpolate the outer inputs into the composite step with items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue