diff options
author | Earl Warren <contact@earl-warren.org> | 2023-04-30 18:14:06 +0200 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2023-08-23 14:44:47 +0200 |
commit | 2b6e6f39ad4d9002dcdb768eab9fc7d5ebfece5c (patch) | |
tree | 124106eff59fb2663de0d3c97da58324a433284c /internal | |
parent | [FORGEJO] build forgejo-runner (diff) | |
download | forgejo-runner-2b6e6f39ad4d9002dcdb768eab9fc7d5ebfece5c.tar.xz forgejo-runner-2b6e6f39ad4d9002dcdb768eab9fc7d5ebfece5c.zip |
[FORGEJO] GITHUB_SERVER_URL is always the runner registration addr
Diffstat (limited to 'internal')
-rw-r--r-- | internal/app/run/runner.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index 7be1dba..483415a 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -48,6 +48,13 @@ func NewRunner(cfg *config.Config, reg *config.Registration, cli client.Client) ls = append(ls, l) } } + + if cfg.Runner.Envs == nil { + cfg.Runner.Envs = make(map[string]string, 10) + } + + cfg.Runner.Envs["GITHUB_SERVER_URL"] = reg.Address + envs := make(map[string]string, len(cfg.Runner.Envs)) for k, v := range cfg.Runner.Envs { envs[k] = v |