DEV Community

Robbie Cargill
Robbie Cargill

Posted on

Alternatives to GitHub Actions for self-hosted runners

With GitHub introducing charges for self-hosted runners, let's break down the other options

GitHub's announcement this week that they intend to introduce a charge for self-hosted CI/CD runners has sparked understandable backlash from devs who had built their workflows around GitHub Actions in an assumption bringing their own runners would and should remain free.

While GitHub have now said they're "postponing" the introduction of these charges, which at $0.002 per minute would represent the same cost as their cheapest hosted runner, many teams will no doubt be continuing to explore alternatives which breaks their dependency on the platform. Perhaps more so when added to some recent concerns about security, bugs, and accusations of platform neglect.

I've been considering this myself - the last build pipeline I setup (for a games team) I went with GitHub Actions and our own EC2 runners. I leant towards this approach for likely the same reasons as many - tight integration with GitHub, where their code already was, and the strength of integrations around it.

Most recently, through working on Buildstash (a software binary management tool) I've been building integrations for - and in the process becoming pretty familiar with - just about every major CI/CD platform out there.
So, if you're looking at options to move to with self-hosted runners in mind, let's explore -

GitLab CI/CD

GitLab has a mature CI/CD platform that supports self-hosted runners at no additional cost on any of their plans, including their free plan. GitLab has the additional benefit of offering an "open core" self-hosted edition, if you want to run your full DevOps stack on your own infrastructure.

GitLab screenshot

One limitation worth noting however, if you wish to use GitLab CI/CD with an externally hosted repository, including GitHub, this is only supported on GitLab's paid "Premium" plan and up, which these days is a costly $29/user/mo (a starting price more than GitHub's enterprise plan!).

GitLab also have a CI/CD catalog with reusable components, though the selection available is far more limited than GitHub.

When it comes to self-hosting the GitLab platform is also much heavier and more complex than some alternatives we'll cover. If you're already onboard GitLab, or want to go all-in on their comprehensive DevOps platform, it's a solid choice to consider.

Forgejo / Gitea

Forgejo is a community fork of Gitea, born out of disagreements with the for-profit direction Gitea was taking, and concerns over moving to a GitLab-like "open core" model. On the whole, both still offer very similar functionality, but Forgejo development appears to be progressing faster and offers lots of minor improvements, and would be the choice I'd tend towards.

Forgejo screenshot

Both options are open source and fully self-hostable. There are a number of hosted Forgejo instances, Codeberg being the most prominent.

Particularly notably, both Forgejo / Gitea offer a CI/CD tool called "Actions", which is intentionally designed to be familiar to GitHub Actions users. There will likely still be some migration work, and of course for any actions in the GitHub marketplace you'll need to find alternatives or fork them.

But if you want an experience which is as familiar as possible to GitHub, while gaining full control, Forgejo (or Gitea) would be an excellent choice. Also, while there has been some discussion of Forgejo not performing as well for massive workspaces as more mature enterprise solutions like GitLab, they have made good improvements in this area.

CircleCI

CircleCI is another popular and mature platform, with extensive support for plugins / reusable workflows in the form of "orbs".

CircleCI screenshot

They offer cloud-hosted and self-hosted runner options. Self-hosted runners are not charged per-minute, but there is a limit to the number of concurrent runners on each plan - with 5 possible on their free plan. So at least the limits are fairly generous, even if frustrating.

With simple support out the box for any git host (GitHub, GitLab, and Bitbucket well supported) this could be a good solution if you want a solid hosted CI platform with self-hosted runner support, while decoupling it from your git hosting platform. On the downside, unlike open source options, there's no migration path to fully self-hosted if you preferred later, meaning you're still dealing with a degree of lock-in.

Jenkins

Somewhat the veteran CI/CD platform, Jenkins is free and open-source for self-hosting. A major pro is certainly its significant plugin ecosystem, with broad support for integrations, as well as a strong community and expansive documentation.

Jenkins screenshot

Jenkins has also been significantly modernised its UI lately. On the other hand, it remains a much more resource-heavy option, and is more complex to configure. Also, as extensive as plugin support is, due to the age of the platform you may more frequently come across unmaintained or outdated plugins, which can be a frustration.

Tangled Pipelines

Tangled is a decentralised Git hosting platform, built on the AT Protocol. This makes it an interesting alternative, allowing full self-hosting, while allowing communication between instances for a more "GitHub like" experience across the network. (Forgejo are also working on federation via ForgeFed, but seem further behind).

Tangled screenshot

Tangled also recently added a Nix-based CI runner called Spindle. Right now, it's fairly basic, and can spin up a Docker container, while pulling in any Nixpkg. If the Tangled platform and its decentralised nature seems intriguing to you, this one is definitely worth exploring more - but it's probably not ready to move all your teams critical projects over to quite yet.

Bitbucket Pipelines

Atlassian's Bitbucket also offers a CI/CD tool called Pipelines. Self-hosted runners are well supported, and there's a reasonable library of integrations.

Bitbucket screenshot

On the other hand, Atlassian also just announced plans to move from not charging from self-hosted runners, to a flat $15/month charge per concurrent build slot (whether you use it or not). Understandably, developers were not happy, and Atlassian have now also announced they're postponing the move for now.

TeamCity

JetBrains TeamCity is a powerful CI/CD server, with a polished and user-friendly interface, and offering both hosted and on-premises options - with a pretty generous free tier for the self-hosted edition.

TeamCity screenshot

For the SaaS edition, self-hosted runners (or agents, in TeamCity terminology) are not free, but priced at essentially a fixed fee (in the form of a fixed number of build "credits") rather than by-minute. Buying a pack of credits at £15 each will cover a single self-hosted agent, with some credits spare. As pricing also takes into account number of committers and other factors, TeamCity can quickly become significantly more expensive than alternatives.

The on-premises edition includes 3 runners for free, but quickly becomes expensive beyond that also.

Buildkite

Buildkite is a CI/CD platform which actually defaults towards you providing your own agents (though macOS and Linux hosted agents are available) while they manage the orchestration and provide a user-friendly and extensive UI.

Buildkite screenshot

There's a reasonable selection of integrations, although this won't compete with the larger platforms like GitHub Actions or Jenkins.

There's a fairly generous free plan, allowing for up to 3 concurrent jobs (across either hosted or self-hosted agents); while their paid plan starting from $30/mo (per user) includes 10 concurrent jobs, and a very reasonable $2.50 per additional agent.

In summary

So if you're looking for a GitHub Actions alternative that will let you bring your own runners without the per-minute fee, you'll need to consider your priorities behind any switch:

  • GitHub announcing a vague "postponement" of the fee introduction introduces some uncertainty, maybe they'll back-peddle altogether, lower the fee, or introduce a more reasonable structure. Still, if this is a concern for you it's worth being prepared, or getting ahead of it.

  • With Bitbucket also introducing new self-hosted runner fees which are facing heavy criticism, it's worth considering when switching to a new platform the dangers of suffering a potential "bait and switch" all over again. GitLab CI/CD is a solid platform, but GitLab's pricing generally has been creeping up these last few years.. on the other hand its open core and self-hostable nature is likely to offer some protection.

  • If you want to self-host and keep control over your full build pipeline, including orchestration, Forgejo would be the obvious choice to offer a GitHub-like experience.

  • On the other hand, if you want to lower your maintenance overheads with a hosted platform to run your self-hosted runners from - Codeberg (hosted Forgejo), CircleCI, TeamCity, and Buildkite are all reasonable options. With each offering some key distinctions in terms of functionality, licensing, plugins, and pricing model - the right choice will vary based on your team and requirements.

From the co-founder / developer of Buildstash

As mentioned, I work on Buildstash, a platform for teams managing all of their software binaries which come out of the CI/CD pipeline - whether across mobile or desktop apps, games, or embedded. We already integrate with most of the CI/CD platforms listed above. If a better tool for organizing all your binaries, sharing with your team and testers, and steering to release sounds useful - check it out.

Top comments (0)