mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Fix environment variables and move envs.txt
/event.json
to fixed location (#667)
* fix: environment variables sourcing from `/etc/environment` * fix: move `envs.txt` & `event.json` to `/tmp/` Since #635 `envs.txt` is not copying properly when running `act` in WSL2 Moving it to fixed location resolves that.
This commit is contained in:
parent
338a9481a7
commit
dd198c2dd3
4 changed files with 19 additions and 18 deletions
|
@ -113,8 +113,7 @@ func (sc *StepContext) mergeEnv() map[string]string {
|
|||
}
|
||||
|
||||
if (rc.ExtraPath != nil) && (len(rc.ExtraPath) > 0) {
|
||||
s := append(rc.ExtraPath, `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`)
|
||||
env["PATH"] = strings.Join(s, `:`)
|
||||
env["PATH"] = strings.Join(rc.ExtraPath, `:`)
|
||||
}
|
||||
|
||||
sc.Env = rc.withGithubEnv(env)
|
||||
|
@ -131,7 +130,7 @@ func (sc *StepContext) setupEnv(ctx context.Context) (ExpressionEvaluator, error
|
|||
rc := sc.RunContext
|
||||
sc.Env = sc.mergeEnv()
|
||||
if sc.Env != nil {
|
||||
err := rc.JobContainer.UpdateFromGithubEnv(&sc.Env)(ctx)
|
||||
err := rc.JobContainer.UpdateFromEnv(sc.Env["GITHUB_ENV"], &sc.Env)(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue