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,11 +604,16 @@ func (rc *RunContext) withGithubEnv(env map[string]string) map[string]string {
|
||||||
for _, runnerLabel := range job.RunsOn() {
|
for _, runnerLabel := range job.RunsOn() {
|
||||||
platformName := rc.ExprEval.Interpolate(runnerLabel)
|
platformName := rc.ExprEval.Interpolate(runnerLabel)
|
||||||
if platformName != "" {
|
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]
|
platformName = strings.SplitN(strings.Replace(platformName, `-`, ``, 1), `.`, 1)[0]
|
||||||
env["ImageOS"] = platformName
|
env["ImageOS"] = platformName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue