config: default container workspace set to host path (#279)

The container workspace path is overwritten by the default host workspace path ($HOME/.cache/act).

Workaround:
```yaml
host:
  workdir_parent: workspace
```

Ref: 34d15f21c2
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/279
Co-authored-by: Michael Santos <michael.santos@gmail.com>
Co-committed-by: Michael Santos <michael.santos@gmail.com>
This commit is contained in:
Michael Santos 2023-07-10 08:57:55 +00:00 committed by Jason Song
parent 3dcfd6ea3d
commit 57ff1df6e0

View File

@ -120,7 +120,7 @@ func LoadDefault(file string) (*Config, error) {
}
if cfg.Host.WorkdirParent == "" {
home, _ := os.UserHomeDir()
cfg.Container.WorkdirParent = filepath.Join(home, ".cache", "act")
cfg.Host.WorkdirParent = filepath.Join(home, ".cache", "act")
}
if cfg.Runner.FetchTimeout <= 0 {
cfg.Runner.FetchTimeout = 5 * time.Second