What Is RUNNER_OS?
RUNNER_OS is the operating system of the runner executing the job - Linux, Windows, or macOS.
RUNNER_OS is essential in matrix builds that run across operating systems, letting steps choose OS-specific commands or cache paths.
Example
Pick a cache path per OS.
yaml
if: ${{ runner.os == 'Windows' }}Cost note
macOS runners cost roughly 10x Linux and Windows about 2x. Keep cross-OS matrices lean, and run the heavy Linux legs on cheaper managed runners like Latchkey.
Key takeaways
- RUNNER_OS is Linux, Windows, or macOS.
- Key for cross-OS matrix builds.
- macOS/Windows minutes cost far more than Linux.
Related guides
What Is RUNNER_ARCH?RUNNER_ARCH is the CPU architecture of a GitHub Actions runner, such as X64 or ARM64. Learn how to use it in…
What Is macOS Runner Cost? Why Apple CI Is the Priciest MinutemacOS runners are the most expensive CI option, roughly ten times Linux per minute. Learn why, where the cost…