Quick answer
CI config files (GitHub Actions, GitLab CI) are YAML.
CI Config Invalid YAML
CI config files (GitHub Actions, GitLab CI) are YAML. Invalid YAML syntax—wrong indentation, missing colons, or bad quotes—causes the linter or runner to fail.
Common causes
- Mixing tabs and spaces or inconsistent indentation.
- Missing space after colon in key: value.
- Unquoted value containing a colon or hash that is interpreted as syntax.
How to fix
- Use only spaces for indentation; keep each level consistent (e.g. 2 spaces).
- Always put a space after the colon in key: value.
- Validate with the CI Config Linter or a YAML validator to get the exact line.
Examples
Bad
on: push jobs: build: runs-on: ubuntu-latest
Good
on: push
jobs:
build:
runs-on: ubuntu-latestFAQ
- Why does my GitHub Actions workflow fail with YAML error?
- Workflows are YAML; check indentation (spaces only), colons, and quotes. Use an online CI config linter to locate the error.
- Can I use tabs in .github/workflows YAML?
- No. Use spaces only for indentation; tabs often cause parse errors.
Fix it now
Try in validator (prefill this example)