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
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue