-
We can tell an action to run when a label is added (or removed), but I can’t seem to narrow the action to _which_ label was added. Anyone know how to accomplish this? With the hcl syntax, GitHub recommended using the filter action to stop a run. The yaml syntax is way better, but this functionality seems to be missing. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @dudo, 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. For example: The labels _ testLab01 _ and _ testLab02 _ are created, edited or deleted will not let first_job be executed.
Only the label _ bug _ is created, edited or deleted will let second_job be executed.
Note:
|
Beta Was this translation helpful? Give feedback.
-
Seems like you might be on the team - any plans on adding this functionality? Your solution is very similar to the original “filter” solution, but more robust label support would be pretty powerful. |
Beta Was this translation helpful? Give feedback.
Hi @dudo,
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.
For example:
The labels _ testLab01 _ and _ testLab02 _ are created, edited or deleted will not let first_job be executed.
Only the label _ bug _ is created, edited or deleted will let second_job be executed.