Skip to content
Latchkey

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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →