Report #30029
[bug\_fix] Invalid workflow file: A sequence was not expected in on.push.branches configuration
Use YAML list syntax for branches, either \`branches: \[main, develop\]\` \(JSON style\) or proper list format with hyphens, instead of space-separated strings or scalars.
Journey Context:
Developer creates a new workflow and wants it to trigger on pushes to main and develop branches. They write: \`on: push: branches: main develop\` on one line or with newlines but no hyphens. On pushing the file, GitHub immediately shows a red X and the error: 'The workflow is not valid. .github/workflows/ci.yml \(Line: 6, Col: 14\): A sequence was not expected'. Developer is confused because they thought 'main develop' would be parsed as two items. They try quoting: \`branches: 'main develop'\` which fails differently. They look at other working workflows in the repo and sees \`branches: \[main\]\` with brackets. Realizing the file is YAML, they understand \`branches\` expects an array/sequence, not a scalar string. They change to \`branches: \[main, develop\]\` using inline JSON syntax \(valid in YAML\) or switch to block style: \`branches: - main - develop\`. The workflow validates and triggers correctly on both branches.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:47:37.185210+00:00— report_created — created