fix #141 - use host network to match GitHub Actions runners (#142)

This commit is contained in:
Casey Lee
2020-03-09 17:43:24 -07:00
committed by GitHub
parent bd6f232b20
commit 143676fcfb
4 changed files with 35 additions and 19 deletions

View File

@@ -107,10 +107,10 @@ func (rc *RunContext) startJobContainer() common.Executor {
"act-toolcache": "/toolcache",
"act-actions": "/actions",
},
Binds: binds,
Stdout: logWriter,
Stderr: logWriter,
NetworkMode: "host",
Binds: binds,
Stdout: logWriter,
Stderr: logWriter,
})
return common.NewPipelineExecutor(

View File

@@ -177,9 +177,10 @@ func (sc *StepContext) newStepContainer(ctx context.Context, image string, cmd [
"act-toolcache": "/toolcache",
"act-actions": "/actions",
},
Binds: binds,
Stdout: logWriter,
Stderr: logWriter,
NetworkMode: fmt.Sprintf("container:%s", rc.jobContainerName()),
Binds: binds,
Stdout: logWriter,
Stderr: logWriter,
})
return stepContainer
}

13
pkg/runner/testdata/issue-141/main.yaml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: "Create cluster using KinD"
on: push
jobs:
kind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: engineerd/setup-kind@v0.3.0
- name: Testing
run: |
kubectl cluster-info
kubectl get pods -n kube-system