mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Fix ImageOS
format (#761)
The current algorithm given `ubuntu-18.04` returns `ubuntu18.04` when it should be `ubuntu18` according to https://github.com/actions/virtual-environments/issues/345#issuecomment-581263296. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
f5835d4e56
commit
b2d6b07d90
1 changed files with 1 additions and 1 deletions
|
@ -707,7 +707,7 @@ func (rc *RunContext) withGithubEnv(env map[string]string) map[string]string {
|
||||||
// hardcode current ubuntu-latest since we have no way to check that 'on the fly'
|
// hardcode current ubuntu-latest since we have no way to check that 'on the fly'
|
||||||
env["ImageOS"] = "ubuntu20"
|
env["ImageOS"] = "ubuntu20"
|
||||||
} else {
|
} else {
|
||||||
platformName = strings.SplitN(strings.Replace(platformName, `-`, ``, 1), `.`, 1)[0]
|
platformName = strings.SplitN(strings.Replace(platformName, `-`, ``, 1), `.`, 2)[0]
|
||||||
env["ImageOS"] = platformName
|
env["ImageOS"] = platformName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue