Skip to content

Commit

Permalink
Only try to process as an Action manifest if the name is action.yml
Browse files Browse the repository at this point in the history
An Action manifest must be named `action.yml` per
https://docs.github.com/en/actions/creating-actions/about-custom-actions

Signed-off-by: Eric Cornelissen <ericornelissen@gmail.com>
  • Loading branch information
ericcornelissen committed Aug 24, 2023
1 parent b13c922 commit ad24c3d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,13 @@ func run(target string) (hasProblems bool, err error) {
}
}
} else {
if problems, err := tryManifest(target); err != nil {
return hasProblems, err
} else {
hasProblems = len(problems) > 0
printProblems(target, problems)
if stat.Name() == "action.yml" {
if problems, err := tryManifest(target); err != nil {
return hasProblems, err
} else {
hasProblems = len(problems) > 0
printProblems(target, problems)
}
}

if problems, err := tryWorkflow(target); err != nil {
Expand Down

0 comments on commit ad24c3d

Please sign in to comment.