fix GOOS parsing to match expected GHA RUNNER_OS values (#2422)

github actions reports RUNNER_OS for linux and windows with capital letters (Linux, Windows). This should increase compatibility when runner uses `-self-hosted`

Co-authored-by: Jason Song <i@wolfogre.com>
This commit is contained in:
benniekiss
2024-08-13 13:33:47 -04:00
committed by GitHub
parent 102e6cbce0
commit 60a2fed37b

View File

@@ -435,6 +435,8 @@ func goArchToActionArch(arch string) string {
func goOsToActionOs(os string) string { func goOsToActionOs(os string) string {
osMapper := map[string]string{ osMapper := map[string]string{
"linux": "Linux",
"windows": "Windows",
"darwin": "macOS", "darwin": "macOS",
} }
if os, ok := osMapper[os]; ok { if os, ok := osMapper[os]; ok {