Skip to content
Latchkey

How to Migrate Self-Hosted Agents to Self-Hosted Runners

A Jenkins agent or GitLab runner becomes a GitHub Actions self-hosted runner; the agent label or runner tag becomes a runner label you target with runs-on.

Register a self-hosted runner on the repo or organization, label it to match the capability you relied on (for example gpu or arm64), then target it with runs-on: [self-hosted, <label>].

Concept mapping

Other systemsGitHub Actions
Jenkins agent + labelself-hosted runner + label
GitLab runner + tagsself-hosted runner + label
agent { label 'gpu' }runs-on: [self-hosted, gpu]
runner concurrencyrunner group + count

Register and target

Terminal
# On the machine, from repo Settings > Actions > Runners
./config.sh --url https://github.com/my-org/my-repo --token <REG_TOKEN> --labels gpu,linux
./run.sh

Workflow

.github/workflows/ci.yml
jobs:
  train:
    runs-on: [self-hosted, gpu]
    steps:
      - uses: actions/checkout@v4
      - run: ./train.sh

What does not map cleanly

  • Self-hosted runners do not auto-scale; you size and patch the fleet yourself, or use managed runners such as Latchkey that scale and auto-heal transient failures.
  • Runner labels are advisory; a mislabeled runner can pick up a job it cannot serve.
  • Ephemeral runs need the --ephemeral flag plus fresh registration each job.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →