Merge pull request '[FORGEJO] a network of "" is not the same as "host"' (#35) from earl-warren/act:wip-network into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/35 Reviewed-by: twenty-panda <twenty-panda@noreply.code.forgejo.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
commit
af0a149a4d
1 changed files with 1 additions and 8 deletions
|
@ -535,13 +535,6 @@ func (rc *RunContext) startJobContainer() common.Executor {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
jobContainerNetwork := rc.Config.ContainerNetworkMode.NetworkName()
|
|
||||||
if rc.containerImage(ctx) != "" {
|
|
||||||
jobContainerNetwork = networkName
|
|
||||||
} else if jobContainerNetwork == "" {
|
|
||||||
jobContainerNetwork = "host"
|
|
||||||
}
|
|
||||||
|
|
||||||
rc.JobContainer = container.NewContainer(&container.NewContainerInput{
|
rc.JobContainer = container.NewContainer(&container.NewContainerInput{
|
||||||
Cmd: nil,
|
Cmd: nil,
|
||||||
Entrypoint: []string{"tail", "-f", "/dev/null"},
|
Entrypoint: []string{"tail", "-f", "/dev/null"},
|
||||||
|
@ -552,7 +545,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
|
||||||
Name: name,
|
Name: name,
|
||||||
Env: envList,
|
Env: envList,
|
||||||
Mounts: mounts,
|
Mounts: mounts,
|
||||||
NetworkMode: jobContainerNetwork,
|
NetworkMode: networkName,
|
||||||
NetworkAliases: []string{rc.Name},
|
NetworkAliases: []string{rc.Name},
|
||||||
Binds: binds,
|
Binds: binds,
|
||||||
Stdout: logWriter,
|
Stdout: logWriter,
|
||||||
|
|
Loading…
Reference in a new issue