From ba0e3adf3486f84cc23034f53b54dde61b34c36a Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 30 Apr 2023 18:14:06 +0200 Subject: [PATCH] [FORGEJO] GITHUB_SERVER_URL is always the runner registration addr --- internal/app/run/runner.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index b07e59c..86b41ac 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -47,6 +47,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