Official github actions documentation says I can set the defaults
to specfify defaults settings for all jobs (https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaults). I want to set that up to specify
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:
...
But this fails with
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'
I want to specify the same runs-on
and strategy
for all my jobs. Why isn't the defaults
working?