官方 github 操作文档说我可以defaults
设置为所有作业指定默认设置(https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults)。我想设置它以指定
defaults:
runs-on: ubuntu-latest
strategy:
fail-fast: false # do not cancel 7.2 if 7.3 fails
matrix:
php: ['7.2', '7.3', '7.4']
node-version: ['12.5']
jobs:
...
但这失败了
The workflow is not valid. .github/workflows/code_checks.yaml (Line: 7, Col: 3): Unexpected value 'runs-on',.github/workflows/code_checks.yaml (Line: 8, Col: 3): Unexpected value 'strategy'
我想为我的所有工作指定相同runs-on
的strategy
内容。为什么不defaults
工作?