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

fix: return error on reusable workflows (#1093)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryan 2022-03-30 19:20:45 +02:00 committed by GitHub
parent 74cca3f919
commit e63bb86b81
4 changed files with 18 additions and 0 deletions

View file

@ -116,6 +116,8 @@ func New(runnerConfig *Config) (Runner, error) {
return runner, nil
}
// NewPlanExecutor ...
//nolint:gocyclo
func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
maxJobNameLen := 0
@ -128,6 +130,11 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
for r, run := range stage.Runs {
stageExecutor := make([]common.Executor, 0)
job := run.Job()
if job.Uses != "" {
return fmt.Errorf("reusable workflows are currently not supported (see https://github.com/nektos/act/issues/826 for updates)")
}
if job.Strategy != nil {
strategyRc := runner.newRunContext(run, nil)
if err := strategyRc.NewExpressionEvaluator().EvaluateYamlNode(&job.Strategy.RawMatrix); err != nil {