Gitea Actions "workflow is invalid" in CI
Gitea parsed the workflow file but it does not conform to the Actions schema (a missing required key, a bad structure). The run is rejected before any job starts, and the error names the failing field.
What this error means
A run is created but immediately marked failed with a workflow validation error, or the Actions tab shows the workflow could not be parsed into jobs.
Gitea Actions
workflow is not valid. .gitea/workflows/ci.yml: yaml: line 6:
mapping values are not allowed in this contextCommon causes
A structural or indentation error in the YAML
Mismatched indentation or a mapping in the wrong place is valid text but an invalid workflow structure.
A missing required key
Omitting runs-on, jobs, or steps where required makes the workflow fail schema validation.
How to fix it
Fix the field the error names
- Read the file and line in the validation message.
- Correct the indentation or add the missing required key.
- Push again and confirm the workflow parses into jobs.
.gitea/workflows/ci.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make buildLint the workflow before pushing
Validate the YAML structure locally so schema errors surface before they reach the instance.
Terminal
yamllint .gitea/workflows/ci.ymlHow to prevent it
- Lint workflow YAML in a pre-commit hook.
- Copy from a known-good workflow when starting a new one.
- Keep two-space indentation consistent throughout.
Related guides
Gitea Actions workflows not detected (.gitea/workflows vs .github/workflows) in CIFix Gitea Actions not running any workflow in CI - Gitea reads workflows from .gitea/workflows and .github/wo…
Gitea Actions "task failed" (job failed on the runner) in CIFix Gitea Actions reporting a task failed in CI - the runner executed the job but a step exited non-zero or t…
Gitea Actions "unable to resolve action" (uses) in CIFix Gitea Actions "unable to resolve action" in CI - the instance cannot fetch the action named in uses becau…