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
|
||||
}
|
||||
|
||||
jobContainerNetwork := rc.Config.ContainerNetworkMode.NetworkName()
|
||||
if rc.containerImage(ctx) != "" {
|
||||
jobContainerNetwork = networkName
|
||||
} else if jobContainerNetwork == "" {
|
||||
jobContainerNetwork = "host"
|
||||
}
|
||||
|
||||
rc.JobContainer = container.NewContainer(&container.NewContainerInput{
|
||||
Cmd: nil,
|
||||
Entrypoint: []string{"tail", "-f", "/dev/null"},
|
||||
|
@ -552,7 +545,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
|
|||
Name: name,
|
||||
Env: envList,
|
||||
Mounts: mounts,
|
||||
NetworkMode: jobContainerNetwork,
|
||||
NetworkMode: networkName,
|
||||
NetworkAliases: []string{rc.Name},
|
||||
Binds: binds,
|
||||
Stdout: logWriter,
|
||||
|
|
Loading…
Reference in a new issue