# How do I use a different GitHub Actions runner without editing every workflow?

Source: https://sengi.run/questions/change-runner-without-editing-workflows

By Sengi · Last checked November 21, 2026

## Can I change the runner without editing every workflow?

Not with zero edits: GitHub picks a runner job by job from `runs-on`, and a job that says `ubuntu-latest` only ever runs on GitHub’s machines. Make it a one-time edit instead: change each job to `runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}` in one pull request, then set `CI_RUNNER` as a repository or organization variable, and every workflow that reads it moves when you change the value. On Sengi the value is one label such as `sengi-basic-2-ubuntu-2404`, $0.001 a minute, one-sixth of GitHub’s $0.006, and a coding agent can open that pull request for you.

**Last checked November 21, 2026**, against GitHub’s workflow syntax and variables documentation and Sengi’s setup guide.

## What are the ways to change the runner in many workflows?

| Way | What you edit once | What a later change takes | Good for |
| --- | --- | --- | --- |
| A variable in `runs-on` | Each job’s `runs-on` to `${{ vars.CI_RUNNER }}` | One repository or organization variable in Settings | Moving many repositories together, and moving back |
| A reusable workflow | Callers pass a `runner` input; the shared workflow reads `runs-on: ${{ inputs.runner }}` | The shared workflow’s default, or one caller’s input | Teams that already share a workflow |
| A matrix value | `runs-on: ${{ matrix.runner }}` with two runners in the list | The list | Running the same job on two runners side by side before choosing |
| One find-and-replace pull request | Every `runs-on` line, rewritten to the new label | Another pull request | A handful of workflows, or a one-way move |

Each job still names one runner; the difference is where that name lives. Jobs on macOS, Windows or arm64 keep their own labels, so leave those lines out of the change.

## How do I set it up with a variable?

1. Change each Linux job once, in one pull request:
   ```
   jobs:
     test:
       runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
   ```
2. Merge it. With no variable set, jobs keep running on `ubuntu-latest`.
3. Set `CI_RUNNER` under **Settings → Secrets and variables → Actions → Variables**, on one repository to try it, then on the organization for the rest.
4. To move a job size by size, use one variable per size, such as `CI_RUNNER_4` for the jobs that run on a 4 vCPU runner today.

A find-and-replace does step 1 for jobs on `ubuntu-latest`, with GNU sed:

```
grep -rl 'runs-on: ubuntu-latest' .github/workflows \
  | xargs sed -i "s/runs-on: ubuntu-latest/runs-on: \${{ vars.CI_RUNNER || 'ubuntu-latest' }}/"
```

If you lint workflows with actionlint, declare the runner labels you use in `.github/actionlint.yaml`.

## How does this work with Sengi?

Set the variable to one Sengi label: `sengi-basic-2-ubuntu-2404`, `sengi-basic-4-ubuntu-2404` or `sengi-basic-8-ubuntu-2404` for Sengi Basic at $0.001, $0.002 and $0.004 a minute, or the `premium` labels for the performance class at $0.003, $0.006 and $0.012. GitHub resolves the expression before the job reaches Sengi, and the repository must be connected to a Sengi project. A job whose label is wrong stays queued: check the value the expression produced in the job’s log.

Or [give your coding agent one prompt](https://sengi.run/agent) and it finds the jobs Sengi can run, changes only their `runs-on` lines and opens the pull request. Before you move them, see [what can break when you leave GitHub-hosted runners](https://sengi.run/questions/what-breaks-moving-off-github-hosted-runners), and compare every runner’s price in the [runner comparison](https://sengi.run/compare).

## Frequently asked questions

### Can I change the runner for every workflow from GitHub’s settings?

Not for jobs that name a GitHub-hosted label such as ubuntu-latest: GitHub runs those on its own machines whatever else you install. Edit each job once so its runs-on reads a variable, and from then on the runner is a setting.

### Can runs-on use a variable?

Yes. runs-on accepts expressions, including the vars context, so runs-on: ${{ vars.CI_RUNNER }} reads a repository or organization variable, and ${{ vars.CI_RUNNER || 'ubuntu-latest' }} falls back to GitHub’s runner when the variable is not set. GitHub resolves the expression before the job is sent to a runner.

### Does an organization variable reach every repository?

It reaches the repositories its access policy allows: all repositories, private repositories only, or a list you choose. A repository variable of the same name overrides it, so one repository can test a runner before the rest.

### Does Sengi work with a runner label from a variable?

Yes. GitHub resolves the expression before the job reaches Sengi, so any one of the six Sengi labels works, written out or from a variable or matrix value. Sengi’s automated setup rewrites only written-out labels, so change a variable’s value yourself.

### How do I switch back?

Set the variable back to the old label, or delete it if the expression falls back to ubuntu-latest. The next run uses the old runner.
