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>
This commit is contained in:
parent
7879726159
commit
1e72c594ac
1 changed files with 4 additions and 0 deletions
|
@ -414,6 +414,10 @@ const (
|
||||||
|
|
||||||
// Type returns the type of the step
|
// Type returns the type of the step
|
||||||
func (s *Step) Type() StepType {
|
func (s *Step) Type() StepType {
|
||||||
|
if s.Run == "" && s.Uses == "" {
|
||||||
|
return StepTypeInvalid
|
||||||
|
}
|
||||||
|
|
||||||
if s.Run != "" {
|
if s.Run != "" {
|
||||||
if s.Uses != "" {
|
if s.Uses != "" {
|
||||||
return StepTypeInvalid
|
return StepTypeInvalid
|
||||||
|
|
Loading…
Reference in a new issue