mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
fix 99: support string and map variants of container
This commit is contained in:
parent
f28cd9e692
commit
d2ef0e27c7
5 changed files with 63 additions and 5 deletions
|
@ -87,8 +87,9 @@ func (sc *StepContext) setupEnv() common.Executor {
|
|||
step := sc.Step
|
||||
return func(ctx context.Context) error {
|
||||
var env map[string]string
|
||||
if job.Container != nil {
|
||||
env = mergeMaps(rc.GetEnv(), job.Container.Env, step.GetEnv())
|
||||
c := job.Container()
|
||||
if c != nil {
|
||||
env = mergeMaps(rc.GetEnv(), c.Env, step.GetEnv())
|
||||
} else {
|
||||
env = mergeMaps(rc.GetEnv(), step.GetEnv())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue