Add option 'label_patterns' to triggering
section to only trigger workflows if a pull request has a specific label
#2080
Replies: 3 comments 2 replies
-
Hi @nilsreichardt! Thanks for the feedback, actually you should already be able to do this using the when conditions as described in our docs. There are some examples there which use pull request labels as conditions. |
Beta Was this translation helpful? Give feedback.
-
Hey @nilsreichardt |
Beta Was this translation helpful? Give feedback.
-
Hey @nilsreichardt, That being said, you can now get rid of the GitHub action to trigger a Codemagic build and just add a condition to your triggering section as described here to check the PR labels. |
Beta Was this translation helpful? Give feedback.
-
Use case
I'm using the
codemagic_app_preview
CLI to post app preview builds for the pull requests. However, if you don't have the unlimited plan, you might want to only trigger the workflow on pull requests with a specific label to avoid unnecessary builds. For that, it would be great to only trigger the workflow if the pull request has a specific label.Idea
Idea:
This is how it could like in the
codemagic.yaml
:Current workaround:
The current workaround is to create a GitHub Action that triggers the Codemagic build with the Codemagic Build API:
Disclaimer:
This is a low-priority feature request and there is an easy workaround for that. However, I'm creating this request to collect upvote to track if other customers have the same request and what use cases other customers have. If there is a certain demand for that, we could first add good docs for that.
If you are a Codemagic customer and you have another use case for this feature, please let us know in the comments.
Beta Was this translation helpful? Give feedback.
All reactions