Skip to content

Do something if a particular label is set #26261

Answered by BrightRan
pancetta asked this question in Actions
Discussion options

You must be logged in to vote

Currently, GitHub Actions does NOT support to set labels filter for issues event.

However, as a workaround, you can use if conditional to skip all jobs in the workflow when the label does not match the specific label. And you need to add the if conditional on every job.

jobs:
 job01:
    if: github.event.label.name == '<label_name>'

More details, you can reference here: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idif

Replies: 10 comments 3 replies

Comment options

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

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@qrkourier
Comment options

@jbcallej
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@qrkourier
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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