Skip to content

cyclic-needs

GitHub Actionscorrectnessno fixdefault: errorgithub-actions/actionlint

Reports jobs whose needs form a cycle, such as a needing b and b needing a.

A job starts when the jobs it needs have finished. In a cycle each job waits for another, so none of them can start, and GitHub rejects the workflow.

To fix, remove one of the needs that closes the cycle.

Reported
jobs:
a:
needs: b
b:
needs: [c]
...
github-actions:
lint:
rules:
cyclic-needs: error # off, warn, error (default)

Enabled by the presets: github-actions/actionlint.

Suppress one line with sudsy-disable-next-line cyclic-needs in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
actionlint job-needs/cycle full