add support to override platform

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee
2020-02-19 22:16:40 -05:00
parent e4ee2ddab7
commit 543501a36a
8 changed files with 59 additions and 37 deletions

View File

@@ -102,7 +102,7 @@ func (rc *RunContext) Executor() common.Executor {
}
platformName := rc.ExprEval.Interpolate(rc.Run.Job().RunsOn)
if img := platformImage(platformName); img == "" {
if img, ok := rc.Config.Platforms[strings.ToLower(platformName)]; !ok || img == "" {
log.Infof(" \U0001F6A7 Skipping unsupported platform '%s'", platformName)
return nil
}