我是GitHub Actions的新手,并且我试图建立一个在不同平台上安装不同系统要求的构建矩阵。从https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml的示例中,我了解了如何编写仅在Windows上运行的步骤:
Error 400: redirect_uri_mismatch
The redirect URI in the request, http://taoofthemind.com/wp-login.php, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/1063798402436-i1gsqc12jqmfvjc64u0ra5hgk48hkrpn.apps.googleusercontent.com?project=1063798402436
或Linux
- name: step name
if: runner.os == 'Windows'
但是,如果我尝试 - name: Install system dependencies
if: runner.os == 'Linux'
,则在Mac OS上将跳过我的步骤。所以我的问题是
if: runner.os == 'Mac'
名称,runner.os
名称列表?答案 0 :(得分:1)
macOS
是您要寻找的:
- name: doing something on macOS
if: runner.os == 'macOS'
您可以在runner
context doc中引用不同的os
类型。