mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
feat: Host environment (#1293)
This commit is contained in:
parent
865c4556e0
commit
ab1deb20a5
38 changed files with 1395 additions and 187 deletions
|
@ -68,7 +68,8 @@ func (sr *stepRun) setupShellCommandExecutor() common.Executor {
|
|||
return err
|
||||
}
|
||||
|
||||
return sr.RunContext.JobContainer.Copy(ActPath, &container.FileEntry{
|
||||
rc := sr.getRunContext()
|
||||
return rc.JobContainer.Copy(rc.JobContainer.GetActPath(), &container.FileEntry{
|
||||
Name: scriptName,
|
||||
Mode: 0755,
|
||||
Body: script,
|
||||
|
@ -128,7 +129,8 @@ func (sr *stepRun) setupShellCommand(ctx context.Context) (name, script string,
|
|||
logger.Debugf("Wrote add-mask command to '%s'", name)
|
||||
}
|
||||
|
||||
scriptPath := fmt.Sprintf("%s/%s", ActPath, name)
|
||||
rc := sr.getRunContext()
|
||||
scriptPath := fmt.Sprintf("%s/%s", rc.JobContainer.GetActPath(), name)
|
||||
sr.cmd, err = shellquote.Split(strings.Replace(scCmd, `{0}`, scriptPath, 1))
|
||||
|
||||
return name, script, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue