Skip to content

Commit 23de934

Browse files
committed
add branches-ignore to workflow_run
1 parent c43cb79 commit 23de934

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/actions/workflows.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,14 @@ func matchWorkflowRunEvent(payload *api.WorkflowRunPayload, evt *jobparser.Event
738738
if !workflowpattern.Skip(patterns, []string{payload.WorkflowRun.HeadBranch}, &workflowpattern.EmptyTraceWriter{}) {
739739
matchTimes++
740740
}
741+
case "branches-ignore":
742+
patterns, err := workflowpattern.CompilePatterns(vals...)
743+
if err != nil {
744+
break
745+
}
746+
if !workflowpattern.Filter(patterns, []string{payload.WorkflowRun.HeadBranch}, &workflowpattern.EmptyTraceWriter{}) {
747+
matchTimes++
748+
}
741749
default:
742750
log.Warn("package event unsupported condition %q", cond)
743751
}

0 commit comments

Comments
 (0)