mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-21 20:27:17 +03:00
default GITHUB_SERVER_URL with registration address
If unset it will default to whatever is in the GITHUB_SERVER_URL environment variable which is not desirable when in the context of integration tests that run a forgejo instance in the CI of another forgejo instance.
This commit is contained in:
parent
cd20007e4d
commit
8b2f1677fe
1 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,14 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command,
|
||||||
version,
|
version,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if cfg.Runner.Envs == nil {
|
||||||
|
cfg.Runner.Envs = make(map[string]string, 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := cfg.Runner.Envs["GITHUB_SERVER_URL"]; !ok {
|
||||||
|
cfg.Runner.Envs["GITHUB_SERVER_URL"] = reg.Address
|
||||||
|
}
|
||||||
|
|
||||||
runner := &runtime.Runner{
|
runner := &runtime.Runner{
|
||||||
Client: cli,
|
Client: cli,
|
||||||
Machine: reg.Name,
|
Machine: reg.Name,
|
||||||
|
|
Loading…
Reference in a new issue