Add: Actions Offline Mode(depend on act offline_mode)

act pull #2128: https://github.com/nektos/act/pull/2128
This commit is contained in:
TKaxv_7S
2023-12-15 23:41:38 +08:00
parent f17cad1bbe
commit 1e0c58693b
3 changed files with 6 additions and 3 deletions

View File

@@ -178,9 +178,10 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report.
runnerConfig := &runner.Config{
// On Linux, Workdir will be like "/<parent_directory>/<owner>/<repo>"
// On Windows, Workdir will be like "\<parent_directory>\<owner>\<repo>"
Workdir: filepath.FromSlash(fmt.Sprintf("/%s/%s", r.cfg.Container.WorkdirParent, preset.Repository)),
BindWorkdir: false,
ActionCacheDir: filepath.FromSlash(r.cfg.Host.WorkdirParent),
Workdir: filepath.FromSlash(fmt.Sprintf("/%s/%s", r.cfg.Container.WorkdirParent, preset.Repository)),
BindWorkdir: false,
ActionCacheDir: filepath.FromSlash(r.cfg.Host.WorkdirParent),
ActionOfflineMode: r.cfg.Cache.OfflineMode,
ReuseContainers: false,
ForcePull: r.cfg.Container.ForcePull,