mirror of
https://gitea.com/gitea/act_runner
synced 2026-05-06 01:37:57 +02:00
fix: step container workdir and mounts (#93)
* fix: step container workdir and mounts * avoid perm issues and do not mount tool_cache
This commit is contained in:
@@ -139,6 +139,14 @@ func (rc *RunContext) GetBindsAndMounts() ([]string, map[string]string) {
|
||||
|
||||
ext := container.LinuxContainerEnvironmentExtensions{}
|
||||
|
||||
if hostEnv, ok := rc.JobContainer.(*container.HostEnvironment); ok {
|
||||
mounts := map[string]string{}
|
||||
// Permission issues?
|
||||
// binds = append(binds, hostEnv.ToolCache+":/opt/hostedtoolcache")
|
||||
binds = append(binds, hostEnv.GetActPath()+":"+ext.GetActPath())
|
||||
binds = append(binds, hostEnv.ToContainerPath(rc.Config.Workdir)+":"+ext.ToContainerPath(rc.Config.Workdir))
|
||||
return binds, mounts
|
||||
}
|
||||
mounts := map[string]string{
|
||||
"act-toolcache": "/opt/hostedtoolcache",
|
||||
name + "-env": ext.GetActPath(),
|
||||
|
||||
Reference in New Issue
Block a user