Skip to content

Commit

Permalink
migrate some improvements discussed in review
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX committed Feb 7, 2025
1 parent 5f0b304 commit 577ff3f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions services/actions/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,19 @@ func DispatchActionWorkflow(ctx *context.Context, workflowID, ref string, proces
// find workflow from commit
var workflows []*jobparser.SingleWorkflow
for _, entry := range entries {
if entry.Name() == workflowID {
content, err := actions.GetContentFromEntry(entry)
if err != nil {
return err
}
workflows, err = jobparser.Parse(content)
if err != nil {
return err
}
break
if entry.Name() != workflowID {
continue
}

content, err := actions.GetContentFromEntry(entry)
if err != nil {
return err
}
workflows, err = jobparser.Parse(content)
if err != nil {
return err
}
break
}

if len(workflows) == 0 {
Expand Down

0 comments on commit 577ff3f

Please sign in to comment.