mirror of
https://gitea.com/gitea/act_runner.git
synced 2024-12-27 19:38:20 +01:00
Fix failed to create container if the runner works in root dir (#67)
Fix #56 This PR uses the `preset.Repository` as a part of the workdir and use `filepath.FromSlash` to convert the slash characters. Co-authored-by: Jason Song <i@wolfogre.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/67 Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: Zettat123 <zettat123@gmail.com> Co-committed-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
parent
9f90cba993
commit
8f81f40d62
@ -212,7 +212,9 @@ func (t *Task) Run(ctx context.Context, task *runnerv1.Task, runnerName, runnerV
|
||||
|
||||
input := t.Input
|
||||
config := &runner.Config{
|
||||
Workdir: "." + string(filepath.Separator),
|
||||
// On Linux, Workdir will be like "/<owner>/<repo>"
|
||||
// On Windows, Workdir will be like "\<owner>\<repo>"
|
||||
Workdir: filepath.FromSlash(string(filepath.Separator) + preset.Repository),
|
||||
BindWorkdir: false,
|
||||
ReuseContainers: false,
|
||||
ForcePull: input.forcePull,
|
||||
|
Loading…
Reference in New Issue
Block a user