Skip to content

Commit

Permalink
fix: return invalid step type
Browse files Browse the repository at this point in the history
If a step does not have either a `run` or `uses` directive it is
considered invalid.
  • Loading branch information
KnisterPeter authored and github-actions committed May 11, 2022
1 parent 063fbb2 commit 6c14531
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/model/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c14531

Please sign in to comment.