gitea/modules/actions
Nicolas 980a8995bc
Report structurally invalid workflows to users (#37116)
`model.ReadWorkflow` succeeds for YAML that is syntactically valid but
fails deeper parsing in `jobparser.Parse` (e.g. blank lines inside `run:
|` blocks cause a SetJob round-trip error). Add
`ValidateWorkflowContent` which runs the full `jobparser.Parse` to catch
these cases, and use it in the file view, the actions workflow list, and
the workflow detection loop so users see the error instead of silently
getting a 500 or a dropped workflow.

Fixes #37115
Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-09 15:03:32 +02:00
..
jobparser Update golangci-lint to v2.11.4 (#37059) 2026-03-31 16:22:23 +00:00
artifacts.go
github.go Improve actions notifier for `workflow_run` (#37088) 2026-04-02 22:41:27 -07:00
github_test.go
log.go
task_state.go
task_state_test.go
workflows.go Report structurally invalid workflows to users (#37116) 2026-04-09 15:03:32 +02:00
workflows_test.go Report structurally invalid workflows to users (#37116) 2026-04-09 15:03:32 +02:00