Allow CI workflow to run on Pull requests, only when requested #127241
Replies: 3 comments 1 reply
-
Would the "developer" be the contributor making the PR, or the repository maintainer(s) reviewing the PR? If they're the contributor, perhaps you could use the draft status as a flag for when the workflow should run? You could use the |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
I still haven't found a working solution and I don't know which information I could share to help |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi,
We would like to run CI on our PRs, only when the developer really wants it.
Is there a way to condition the whole workflow to not trigger, until this condition is met ?
We are currently trying to use a label RUN-CI on the PR, then the jobs needs to check if that label exists.
Here are the events in the workflow.
Here is a
if
condition example :But this is annoying, because:
We tried manual triggers (workflow_dispatch) but they are not attached to the PR status checks.
Solutions we could imagine :
if
field on the workflow itself, which would avoid to trigger the unnecessary workflowThere is certainly other options that I can't see :)
Did I miss something ?
Beta Was this translation helpful? Give feedback.
All reactions