add new envs
This commit is contained in:
parent
93e42d1465
commit
222b5100b6
4 changed files with 19 additions and 13 deletions
|
@ -75,9 +75,18 @@ func FromEnviron() (Config, error) {
|
|||
cfg.ForgeInstance = runner.ForgeInstance
|
||||
}
|
||||
|
||||
cfg.Client.Address = fmt.Sprintf(
|
||||
"%s://%s",
|
||||
cfg.Client.Proto,
|
||||
cfg.Client.Host,
|
||||
)
|
||||
|
||||
// runner config
|
||||
if cfg.Runner.Environ == nil {
|
||||
cfg.Runner.Environ = map[string]string{}
|
||||
cfg.Runner.Environ = map[string]string{
|
||||
"GITHUB_API_URL": cfg.Client.Address + "/api/v1",
|
||||
"GITHUB_SERVER_URL": cfg.Client.Address,
|
||||
}
|
||||
}
|
||||
if cfg.Runner.Name == "" {
|
||||
cfg.Runner.Name, _ = os.Hostname()
|
||||
|
@ -91,12 +100,6 @@ func FromEnviron() (Config, error) {
|
|||
cfg.Platform.Arch = runtime.GOARCH
|
||||
}
|
||||
|
||||
cfg.Client.Address = fmt.Sprintf(
|
||||
"%s://%s",
|
||||
cfg.Client.Proto,
|
||||
cfg.Client.Host,
|
||||
)
|
||||
|
||||
if file := cfg.Runner.EnvFile; file != "" {
|
||||
envs, err := godotenv.Read(file)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue