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 systems | GitHub Actions |
|---|---|
Jenkins agent + label | self-hosted runner + label |
GitLab runner + tags | self-hosted runner + label |
agent { label 'gpu' } | runs-on: [self-hosted, gpu] |
| runner concurrency | runner 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.shWorkflow
.github/workflows/ci.yml
jobs:
train:
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v4
- run: ./train.shWhat 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
--ephemeralflag plus fresh registration each job.
Related guides
How to Migrate a Declarative Jenkinsfile to GitHub ActionsTranslate a declarative Jenkins pipeline to GitHub Actions, mapping stages to jobs, agents to runners, and th…
How to Migrate CI Incrementally by Running Both in ParallelCut over from another CI to GitHub Actions safely by running both pipelines in parallel, comparing results, a…