Update images, fix extrapath (#723)
* fix: typo * fix: remove debug for git references it generates a massive amount of logs * feat: read values from env allows to test act on GHA when it's not a main repo * fix: merge extrapath with PATH * fix(tests): add additional shells for testing * fix(image): update images pin node to major version only, current node version: 12.22.1 replace most images with `node:12-buster-slim` to prevent errors on macOS runner due to DockerHub pull limit replace ocaml image Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
@@ -125,9 +125,13 @@ func (sc *StepContext) mergeEnv() map[string]string {
|
||||
env = mergeMaps(rc.GetEnv(), step.GetEnv())
|
||||
}
|
||||
|
||||
env["PATH"] = `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`
|
||||
if (rc.ExtraPath != nil) && (len(rc.ExtraPath) > 0) {
|
||||
if env["PATH"] == "" {
|
||||
env["PATH"] = `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`
|
||||
}
|
||||
if rc.ExtraPath != nil && len(rc.ExtraPath) > 0 {
|
||||
p := env["PATH"]
|
||||
env["PATH"] = strings.Join(rc.ExtraPath, `:`)
|
||||
env["PATH"] += `:` + p
|
||||
}
|
||||
|
||||
sc.Env = rc.withGithubEnv(env)
|
||||
|
Reference in New Issue
Block a user