1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

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:
Ryan (hackercat) 2021-06-10 23:12:05 +00:00 committed by GitHub
parent bdc0480934
commit 21760b18c2
21 changed files with 103 additions and 50 deletions

View file

@ -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)