summaryrefslogtreecommitdiffstats
path: root/cmd/platforms.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/platforms.go')
-rw-r--r--cmd/platforms.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmd/platforms.go b/cmd/platforms.go
new file mode 100644
index 0000000..45724d7
--- /dev/null
+++ b/cmd/platforms.go
@@ -0,0 +1,22 @@
+package cmd
+
+import (
+ "strings"
+)
+
+func (i *Input) newPlatforms() map[string]string {
+ platforms := map[string]string{
+ "ubuntu-latest": "node:16-buster-slim",
+ "ubuntu-22.04": "node:16-bullseye-slim",
+ "ubuntu-20.04": "node:16-buster-slim",
+ "ubuntu-18.04": "node:16-buster-slim",
+ }
+
+ for _, p := range i.platforms {
+ pParts := strings.Split(p, "=")
+ if len(pParts) == 2 {
+ platforms[strings.ToLower(pParts[0])] = pParts[1]
+ }
+ }
+ return platforms
+}