mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: crash malformed composite action (#1616)
* fix: crash malformed composite action * Add remote composite action test --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
75baa9dc3b
commit
606fd4bde1
4 changed files with 43 additions and 2 deletions
|
@ -503,7 +503,10 @@ func runPreStep(step actionStep) common.Executor {
|
|||
step.getCompositeRunContext(ctx)
|
||||
}
|
||||
|
||||
return step.getCompositeSteps().pre(ctx)
|
||||
if steps := step.getCompositeSteps(); steps != nil && steps.pre != nil {
|
||||
return steps.pre(ctx)
|
||||
}
|
||||
return fmt.Errorf("missing steps in composite action")
|
||||
|
||||
default:
|
||||
return nil
|
||||
|
@ -592,7 +595,10 @@ func runPostStep(step actionStep) common.Executor {
|
|||
return err
|
||||
}
|
||||
|
||||
return step.getCompositeSteps().post(ctx)
|
||||
if steps := step.getCompositeSteps(); steps != nil && steps.post != nil {
|
||||
return steps.post(ctx)
|
||||
}
|
||||
return fmt.Errorf("missing steps in composite action")
|
||||
|
||||
default:
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue