Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
GitHub Actions charges you based on the total time your workflows spend running, rounded up to the nearest minute. Even if a job is skipped because of a draft pull request, the workflow still starts and any time spent counts towards billing. Unfortunately, github doesn't provide a way to completely avoid charges for actions triggered by draft pull requests. |
Beta Was this translation helpful? Give feedback.
-
Hello Rob, Great question regarding GitHub Actions billing, especially as it pertains to draft pull requests. Given your current setup where the workflow is triggered but the job is skipped for draft PRs, GitHub will still initiate the runner, and this brief period counts towards billing. As per GitHub's billing policy, each job's runtime rounds up to the nearest whole minute. This means even a few seconds spent initiating a job will be counted as one minute. Unfortunately, GitHub does not provide a built-in feature at the account level to completely disable actions for draft PRs. However, there are a couple of strategies you can consider to manage this situation more efficiently and possibly reduce costs:
While none of these solutions disables actions entirely without any initiation, they can help manage and reduce unnecessary runs, aligning your usage more closely with your needs and potentially reducing costs. If none of these solutions fit, I recommend reaching out to GitHub support or consulting the GitHub community forums for more tailored advice or updates on potential feature implementations that could help in the future. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi all,
So we have the setup below for a github action/workflow. It skips this job when the PR is a draft. Which is great. However, as the git workflow/action is still being activated, even if it only takes a few seconds, are we still getting changed for the partial minute?
As on here Git Billing it states "GitHub rounds the minutes and partial minutes each job uses up to the nearest whole minute."
If that is the case, then is there anywhere else on an account level perhaps that will allow us to disable actions completely on draft PRs, without incurring any charges?
Any advice/thoughts are much appreciated,
Regards
Rob
Beta Was this translation helpful? Give feedback.
All reactions