mirror of
https://github.com/nektos/act.git
synced 2024-11-12 23:46:30 +03:00
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,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 New Issue
Block a user