By making a trivial change to an existing test_build.yaml, GitHub Actions complains about a syntax error in the concurrency property.
Invalid workflow file : .github/workflows/test_build.yaml#L3
You have an error in your yaml syntax on line 3
- I'm running in the github.com Actions environment, not my own.
- If I re-order the properties it remains broken.
- If I remove the properties from
concurrency it works again.
- I've validated that the yaml is valid yaml. So the error is confusing and unhelpful.
Note: This exact yaml file has been working for months. The only change I made was to rename a job.
Broken Example
name: Project CI
concurrency:
cancel-in-progress: true # "Syntax error" here?
group: muffins
on:
pull_request:
branches: [devel, staging, prod]
push:
branches: [devel, staging, prod]
jobs:
test_ui:
defaults:
run:
working-directory: ./ui
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm run validate
Working Example
name: Project CI
concurrency: muffins
on:
pull_request:
branches: [devel, staging, prod]
push:
branches: [devel, staging, prod]
jobs:
test_ui:
defaults:
run:
working-directory: ./ui
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm run validate
By making a trivial change to an existing
test_build.yaml, GitHub Actions complains about a syntax error in theconcurrencyproperty.concurrencyit works again.Note: This exact yaml file has been working for months. The only change I made was to rename a job.
Broken Example
Working Example