Combining workflow triggers (specifically schedule + pull_request) #55768
-
Select Topic AreaQuestion BodyHi, I'm trying to figure out if I can set up one of my project's actions workflows to run no more than once per day, and only after at least one push to an active PR. The workflow is optional, but quite expensive to run so I'd rather not have it consuming actions resources for every push to a branch; running once per day is optimal. In order for this to work, the cron should be scheduled such that it can't run more than once even if multiple pushes occur. From looking at the documentation, it seems that Hoping to get some suggestions on how I can even approach this. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It's definitely possible, depending on the |
Beta Was this translation helpful? Give feedback.
It's definitely possible, depending on the
permissions
setting you give the workflow. What you won't have in a scheduled workflow is PR data ingithub.event
, instead you'll have to retrieve the PR information from the API (authorized with theGITHUB_TOKEN
, that's why the permissions are important).