* Support array expressions in runs-on * Simplify appproach to use EvaluateYamlNode, fix case-sensitivity bug --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
		
			
				
	
	
		
			23 lines
		
	
	
		
			465 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			465 B
		
	
	
	
		
			Go
		
	
	
	
	
	
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
 | 
						|
}
 |