From bb13ab9aa8dc7532b2827c39a21ddd6e65b7a5df Mon Sep 17 00:00:00 2001 From: Markus Wolf Date: Wed, 11 May 2022 21:30:18 +0200 Subject: [PATCH] fix: return invalid step type (#1157) If a step does not have either a `run` or `uses` directive it is considered invalid. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- act/model/workflow.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/act/model/workflow.go b/act/model/workflow.go index 05d210b6..cca20495 100644 --- a/act/model/workflow.go +++ b/act/model/workflow.go @@ -414,6 +414,10 @@ const ( // Type returns the type of the step func (s *Step) Type() StepType { + if s.Run == "" && s.Uses == "" { + return StepTypeInvalid + } + if s.Run != "" { if s.Uses != "" { return StepTypeInvalid