2020-02-20 11:16:40 +08:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (i *Input) newPlatforms() map[string]string {
|
|
|
|
platforms := map[string]string{
|
2021-09-23 03:43:58 +08:00
|
|
|
"ubuntu-latest": "node:12-buster-slim",
|
|
|
|
"ubuntu-20.04": "node:12-buster-slim",
|
|
|
|
"ubuntu-18.04": "node:12-buster-slim",
|
2020-02-20 11:16:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, p := range i.platforms {
|
|
|
|
pParts := strings.Split(p, "=")
|
|
|
|
if len(pParts) == 2 {
|
|
|
|
platforms[pParts[0]] = pParts[1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return platforms
|
|
|
|
}
|