mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
fix: correctly unmarshal entrypoint (#876)
Signed-off-by: hackercat <me@hackerc.at> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
c82cbd5b5b
commit
17c788feae
3 changed files with 12 additions and 2 deletions
|
@ -527,6 +527,8 @@ func (sc *StepContext) runAction(actionDir string, actionPath string, localActio
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: break out parts of function to reduce complexicity
|
||||
// nolint:gocyclo
|
||||
func (sc *StepContext) execAsDocker(ctx context.Context, action *model.Action, actionName string, containerLocation string, actionLocation string, rc *RunContext, step *model.Step, localAction bool) error {
|
||||
var prepImage common.Executor
|
||||
var image string
|
||||
|
@ -589,7 +591,14 @@ func (sc *StepContext) execAsDocker(ctx context.Context, action *model.Action, a
|
|||
}
|
||||
entrypoint := strings.Fields(step.With["entrypoint"])
|
||||
if len(entrypoint) == 0 {
|
||||
entrypoint = action.Runs.Entrypoint
|
||||
if action.Runs.Entrypoint != "" {
|
||||
entrypoint, err = shellquote.Split(action.Runs.Entrypoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
entrypoint = nil
|
||||
}
|
||||
}
|
||||
stepContainer := sc.newStepContainer(ctx, image, cmd, entrypoint)
|
||||
return common.NewPipelineExecutor(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue