diff options
author | Earl Warren <contact@earl-warren.org> | 2024-03-24 11:56:42 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-24 12:09:40 +0100 |
commit | 09d179c15b0dec8edfa970563652d1a8d2d059dc (patch) | |
tree | 34d326685fc4b5dd96f947f41aa4964aa0179e68 | |
parent | [FORGEJO] Revert "Don't set GITHUB_TOKEN (#2089)" (diff) | |
download | forgejo-act-09d179c15b0dec8edfa970563652d1a8d2d059dc.tar.xz forgejo-act-09d179c15b0dec8edfa970563652d1a8d2d059dc.zip |
[FORGEJO] a network of "" is not the same as "host"
The comment that introduced this change suggests it was motivated by a
border case by which the image would be empty. It is however unclear
why it should have any impact on how the network name is determined.
The hunk is reverted.
https://github.com/nektos/act/pull/1949/files#r1315163582
-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, |