Skip to content

on pull_request labeled #25819

Answered by BrightRan
dudo asked this question in Actions
Discussion options

You must be logged in to vote

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.

jobs:
first_job:
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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants