Reputation: 5841
I am new to GitHub Actions, and I am trying to set up a build matrix that installs different system requirements on different platforms. From the example at https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml, I figured out how to write steps that only run on Windows:
- name: step name
if: runner.os == 'Windows'
or Linux
- name: Install system dependencies
if: runner.os == 'Linux'
But if I try if: runner.os == 'Mac'
, my step gets skipped on Mac OS. So my questions are
runner.os
name do I use for Mac OS, andrunner.os
names?Upvotes: 1
Views: 1302
Reputation: 9866
macOS
is what you looking for:
- name: doing something on macOS
if: runner.os == 'macOS'
You can refer the different os
type in runner
context doc.
Upvotes: 3