config: default container workspace set to host

If both values are unspecified, the container workspace path is
overwritten by the default host workspace path or $HOME/.cache/act.

Ref: 34d15f21c2
This commit is contained in:
Michael Santos 2023-07-08 17:09:26 -04:00
parent 3dcfd6ea3d
commit 80a9dbace6

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