[FORGEJO] GITHUB_SERVER_URL is always the runner registration addr

This commit is contained in:
Earl Warren 2023-04-30 18:14:06 +02:00
parent 586ee5a007
commit ba0e3adf34
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -47,6 +47,13 @@ func NewRunner(cfg *config.Config, reg *config.Registration, cli client.Client)
ls = append(ls, l) 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)) envs := make(map[string]string, len(cfg.Runner.Envs))
for k, v := range cfg.Runner.Envs { for k, v := range cfg.Runner.Envs {
envs[k] = v envs[k] = v