fix: hardcode ubuntu-latest
for ImageOS
envvar (#579)
Hardcode current `ubuntu-latest` since we have no way to check that 'on the fly'
This commit is contained in:
parent
f3b53d8eca
commit
29b3d43988
@ -604,11 +604,16 @@ func (rc *RunContext) withGithubEnv(env map[string]string) map[string]string {
|
||||
for _, runnerLabel := range job.RunsOn() {
|
||||
platformName := rc.ExprEval.Interpolate(runnerLabel)
|
||||
if 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return env
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user