mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: align runner.os / runner.arch to known values (#1510)
* fix: align runner.os / runner.arch to known values * . * . Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
5f0cee8ce1
commit
f3490ecaf7
2 changed files with 29 additions and 6 deletions
|
@ -179,10 +179,11 @@ func (rc *RunContext) startHostEnvironment() common.Executor {
|
|||
StdOut: logWriter,
|
||||
}
|
||||
rc.cleanUpJobContainer = rc.JobContainer.Remove()
|
||||
rc.Env["RUNNER_TOOL_CACHE"] = toolCache
|
||||
rc.Env["RUNNER_OS"] = runtime.GOOS
|
||||
rc.Env["RUNNER_ARCH"] = runtime.GOARCH
|
||||
rc.Env["RUNNER_TEMP"] = runnerTmp
|
||||
for k, v := range rc.JobContainer.GetRunnerContext(ctx) {
|
||||
if v, ok := v.(string); ok {
|
||||
rc.Env[fmt.Sprintf("RUNNER_%s", strings.ToUpper(k))] = v
|
||||
}
|
||||
}
|
||||
for _, env := range os.Environ() {
|
||||
i := strings.Index(env, "=")
|
||||
if i > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue