Engineer Builds On-Demand GitHub Actions Runners Using Temporal and Nomad

A developer running a personal homelab solved a self-hosted GitHub Actions runner scaling problem by combining Temporal workflows with Nomad's parameterized batch jobs. The core issue was that outside a GitHub organization, each self-hosted runner can only be registered to a single repository, requiring one persistent runner per repo and wasting cluster resources during idle time. To fix this, a Temporal schedule polls each repository every 30 seconds, detects queued CI jobs, mints fresh registration tokens, and dispatches ephemeral Nomad runner jobs on demand. Each runner registers with GitHub, processes exactly one job, then deregisters and exits, with restarts and rescheduling explicitly disabled to prevent stale runners from lingering. Configuration and secrets are managed through Consul KV and Vault, with scoped Nomad ACL tokens injected at runtime via Vault's workload identity mechanism.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in