Target your workflows
Jobs reach ushr through their runs-on labels. ushr init rewrites GitHub-hosted targets to ushr labels for you.
Labels
Each host serves the labels in its agent.yaml. A job goes to a host only when the host has every label in the job's runs-on.
jobs:
build:
runs-on: [self-hosted, macOS, ARM64]ushr init
Run it in a repository checkout:
ushr init --dry-run # report what would change
ushr init # rewrite .github/workflows in the current directory
ushr init --dry-run path/to/repoPut flags before the directory. The command reads every .yml and .yaml file in .github/workflows. It changes only job-level runs-on lines and keeps all other lines as they are.
| macos-14, macos-latest, … | [self-hosted, macOS, ARM64] |
| ubuntu-24.04, ubuntu-latest, … | [self-hosted, Linux, X64] |
| ubuntu-24.04-arm, … | [self-hosted, Linux, ARM64] |
What ushr init leaves alone
- Targets that already include
self-hosted. - Custom labels and multi-label targets.
- Intel macOS labels (
macos-13and the-largetier). ushr Macs are ARM64. It prints a warning. - Windows labels. ushr has no Windows driver.
- Expressions such as matrix values, the group form, YAML anchors and multi-line values. It prints a warning so you can edit them by hand.
After a rewrite, make sure your ushr GitHub App is installed on the repository.