1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

Move actions path outside of workdir (#701)

* feat: add option to specify user for exec

* fix: move actions to static path outside workdir

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan (hackercat) 2021-05-24 17:09:03 +00:00 committed by GitHub
parent 343f172304
commit 3f9e6abd6c
4 changed files with 19 additions and 17 deletions

View file

@ -383,13 +383,13 @@ func (sc *StepContext) getContainerActionPaths(step *model.Step, actionDir strin
containerActionDir := "."
if !rc.Config.BindWorkdir && step.Type() != model.StepTypeUsesActionRemote {
actionName = getOsSafeRelativePath(actionDir, rc.Config.Workdir)
containerActionDir = rc.Config.ContainerWorkdir() + "/_actions/" + actionName
containerActionDir = ActPath + "/actions/" + actionName
} else if step.Type() == model.StepTypeUsesActionRemote {
actionName = getOsSafeRelativePath(actionDir, rc.ActionCacheDir())
containerActionDir = rc.Config.ContainerWorkdir() + "/_actions/" + actionName
containerActionDir = ActPath + "/actions/" + actionName
} else if step.Type() == model.StepTypeUsesActionLocal {
actionName = getOsSafeRelativePath(actionDir, rc.Config.Workdir)
containerActionDir = rc.Config.ContainerWorkdir() + "/_actions/" + actionName
containerActionDir = ActPath + "/actions/" + actionName
}
if actionName == "" {