Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 6 min read Case study easyNovice

How we build containerized services at GitHub using GitHub

GitHub runs hundreds of internal and production services on a "paved path": a Kubernetes-based, multi-cluster, multi-region platform plus conventions and custom tooling layered on top. Services are onboarded via a Hubot ChatOps scaffold command and a GitHub App that opens a PR with deployment.yaml, Kubernetes Deployment/Service manifests, a Debian Dockerfile, and CI checks that build images on every push. Each app/environment gets its own namespace, secrets are injected per-environment from a central vault, and deployments render manifests with the latest image and secrets before applying them across clusters. Centralizing capacity planning, security scanning, base images and deploy tooling lets teams skip cluster management and focus on their applications.

Related posts

  • How GitHub’s Developer Experience team improved innerloop development

    GitHub Engineering mediumAdept

    GitHub's Developer Experience team built Hubber Codespace (HCS), a Docker-Compose project that lets engineers stand up the full distributed GitHub ecosystem locally or in a codespace to integration-test changes before deploying. Docker-Compose won out over Minikube, rejected for networking complexity and long cycle times, and over the internal Codespace-Compose, which had no SLA and would add maintenance burden. A Go CLI with versioning that matches HCS releases wraps long compose invocations into commands like `hcs start`, `hcs shell` and `hcs status`. Scheduled automation pins SHAs from the monorepo and service repos into frequent releases, consumed via a devcontainer feature or the gh CLI.

  • Using GitHub Actions with Heroku Flow for additional Security Control

    Heroku Engineering mediumAdept

    Because GitHub Orgs can't allowlist Heroku IP ranges, Heroku offers a sample pattern: a self-hosted GitHub Actions runner deployed as a Docker app in a Heroku Private Space with static outbound IPs, plus a Heroku Flow Action. The action uses the Platform API's Source Endpoint to upload private repo code, deploy apps on push, dispatch or schedule events, and create, update or remove Review Apps on pull request events. A weekly scheduled workflow rebuilds and redeploys the runner to meet GitHub's 30-day update requirement. Tradeoffs include no repo link in the Review App UI, no automatic Heroku CI tests, no Fir support, and a custom runner image that other actions should be tested against.

  • Enabling branch deployments through IssueOps with GitHub Actions

    GitHub Engineering mediumAdept

    GitHub's branch-deploy Action brings the branch deploy model to any repository through IssueOps: comment commands like `.deploy` or `.deploy noop` on a pull request trigger a GitHub Actions workflow that deploys the branch before it is merged. Because changes are deployed and validated before merging, `main` stays stable and rollback means simply redeploying `main`. A sample workflow shows how the action's `continue`, `noop` and `ref` outputs gate deployment steps. The action also respects branch protection, supports deploy locks and configurable environments, and GitHub and npm use it internally, mainly for Terraform infrastructure repos where ChatOps isn't available.

  • How GitHub uses GitHub Actions and Actions larger runners to build and test GitHub.com

    GitHub Engineering mediumAdept

    GitHub moved CI for GitHub.com to GitHub Actions on larger runners, peaking at about 4,500 concurrent 32-core runners, 15,000 jobs per hour and 150,000 cores. Custom VM images that pre-bundle tools and a cached build of the project source, refreshed several times a day through an API, cut workflow time from about 50 to 12 minutes. Reusable workflows keep CI configuration and runner selection central across repositories, and reusing results when Git tree IDs match skips 300-500 runs a day. Isolated runners reach private VPC services through an OIDC-token-validating remote access gateway, whose scaffolding is open-sourced.

  • GitHub’s Engineering Team has moved to Codespaces

    GitHub Engineering mediumAdept

    GitHub moved development of its 14-year-old, 13 GB github/github monolith from bespoke macOS laptops to cloud-hosted Codespaces, replacing fragile local environments with disposable, task-per-branch dev environments. Creation time went from 45 minutes to 5 by shallow cloning with background unshallowing and a nightly GitHub Action that builds a mostly-bootstrapped Docker base image for the devcontainer. It then dropped to 10 seconds with prebuilds, pools of fully cloned and bootstrapped codespaces. Centralized config also let them upgrade every engineer from 8-core to 32-core VMs with one line, share live previews via forwarded ports, and support Vim/Emacs users over SSH.

The quest for software engineering knowledge.

Look:
Layout: