GitHub Actions pricing
Github Actions has gone live earlier in 2020 and many developers and enterprises consider to use it for their CI/CD needs. Taking this into consideration, it is the right time to review the pricing of the service, which is one of the significant aspects to consider when choosing a CI/CD tool.
GitHub charges by the minute
The billing on Github Actions is based on the execution minutes for hosted runners (which basically run workflows). The users with basic membership have 2000 free minutes/month. This number is scaled based on the type of membership:
- PRO: 3000
- Team: 10.000
- Enterprise: 50.000
However, the meaning of „minutes“ is a little bit tricky and could be confusing for new users, so let’s explore what it means to have 2000 free minutes per month to build and deploy your projects.
The “GitHub minute” is an actual minute (60 seconds) only if you run your workflow on Ubuntu based instances. If you try to run your workflow on a windows instance it will charge you with 2 “github minutes” for every 60 seconds. It probably includes the fee for licenses they have paid (theoretically because Microsoft owns GitHub).
If you try to use MacOS based instances to run your automated workflows they will charge you 10 “github minutes” for every 60 seconds. This is due to the fact that they can run MacOS only on MAC hardware which is comparably more expensive. Another annoying thing is that it also counts the minutes spent on the installation of dependencies, code check-out etc.
Thus having 2000 minutes will mean that you can run only 200 mins on MacOS instances and 1000 on Windows instances. Which is actually okay if we are talking about some small projects because usually you don’t deploy every day.
Extra minutes on top
Problems arise when you have some issues and the build or deployment (or any other part of a workflow) periodically fails and you are forced to debug fix and restart your workflow many times. In such cases you can easily run out of minutes and end up having to pay extra fees to GitHub.
So if you have faced such problems here is the pricing for every extra minute:
|OS||Resources||Price per extra minute|
|Linux||2 cores, 7 GB||$ 0,008|
|Windows||2 cores, 7 GB||$0,016|
|MacOS||2 cores, 7 GB||$ 0,08|
So as you can see it could be pretty pricey to run workflows on Mac instances. However, in real life you are not always forced to do that. You have to use MacOS mainly in cases when you build and deploy apps developed for Apple’s OS (MacOS, iOS, etc.). Cases with windows are a little bit more likely but the price is way cheaper than the one for Mac.
Conclusion: How to save money
As a conclusion we can state that exploding MacOS based instances in GitHub actions might be expensive. However, if you prepare everything in advance and do not test your solution many times on GitHub Actions but use that only for building and deployment it should be enough (roughly 10 deployments per month, which is pretty much fine in most of the cases).
Es tut uns sehr leid, dass Ihnen der Artikel nicht Ihren Erwartungen entspricht.
Bitte geben Sie uns Anregungen, wie wir den Artikel verbessern können.