1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix 99: support string and map variants of container

This commit is contained in:
Casey Lee 2020-02-24 22:35:08 -08:00
parent f28cd9e692
commit d2ef0e27c7
5 changed files with 63 additions and 5 deletions

View file

@ -53,8 +53,9 @@ func (rc *RunContext) startJobContainer() common.Executor {
job := rc.Run.Job()
var image string
if job.Container != nil {
image = job.Container.Image
c := job.Container()
if c != nil {
image = c.Image
} else {
platformName := rc.ExprEval.Interpolate(job.RunsOn)
image = rc.Config.Platforms[strings.ToLower(platformName)]