diff options
author | earl-warren <earl-warren@noreply.code.forgejo.org> | 2024-03-24 12:58:34 +0100 |
---|---|---|
committer | earl-warren <earl-warren@noreply.code.forgejo.org> | 2024-03-24 12:58:34 +0100 |
commit | af0a149a4d730e000d5c51517935c4a2ca04f754 (patch) | |
tree | 34d326685fc4b5dd96f947f41aa4964aa0179e68 | |
parent | [FORGEJO] Revert "Don't set GITHUB_TOKEN (#2089)" (diff) | |
parent | [FORGEJO] a network of "" is not the same as "host" (diff) | |
download | forgejo-act-1.20.1.tar.xz forgejo-act-1.20.1.zip |
Merge pull request '[FORGEJO] a network of "" is not the same as "host"' (#35) from earl-warren/act:wip-network into mainv1.20.1
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>
-rw-r--r-- | pkg/runner/run_context.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 8aa004c..06679ca 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -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, |