Solved! Solved! Go to Solution.
At this moment, it does not support to set filter of labels on the label event. Any label is created, edited or deleted will trigger the workflow to run.
As a workaround, you syntax jobs.<job_id>.if to set conditions to decide which labels can let the jobs run or not.
The labels testLab01 and testLab02 are created, edited or deleted will not let first_job be executed.
if: github.event_name == 'label' && github.event.label.name != 'testLab01' && github.event.label.name != 'testLab02'
name: First Job
Only the label bug is created, edited or deleted will let second_job be executed.
jobs: second_job: if: github.event_name == 'label' && github.event.label.name == 'bug' name: Second Job
1) This workaround can't prevent the workflow from running, the workflow will still run. It just can prevent the jobs from running during runing the workflow.
2) If you want the conditions can be available to all jobs, you need to add the conditions on every job.