diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 5ba176d..25ea234 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -604,8 +604,13 @@ func (rc *RunContext) withGithubEnv(env map[string]string) map[string]string { for _, runnerLabel := range job.RunsOn() { platformName := rc.ExprEval.Interpolate(runnerLabel) if platformName != "" { - platformName = strings.SplitN(strings.Replace(platformName, `-`, ``, 1), `.`, 1)[0] - env["ImageOS"] = platformName + if platformName == "ubuntu-latest" { + // hardcode current ubuntu-latest since we have no way to check that 'on the fly' + env["ImageOS"] = "ubuntu20" + } else { + platformName = strings.SplitN(strings.Replace(platformName, `-`, ``, 1), `.`, 1)[0] + env["ImageOS"] = platformName + } } } }