Skip to content

duplicate-ids

GitHub Actionscorrectnessno fixdefault: errorgithub-actions/actionlint

Reports job ids that differ only in case (job ids are not case sensitive; exact repeats are a different rule, no-duplicate-keys), and step ids repeated within a job.

Ids are compared without case, so a reference such as needs.build cannot tell two such jobs apart, and steps.<id>.outputs cannot tell two steps with one id apart.

To fix, give each job and step its own id.

Reported
...
steps:
- id: a
run: echo
- id: A
run: echo
- id: b
run: echo
build:
runs-on: ubuntu-latest
other:
runs-on: ubuntu-latest
...
github-actions:
lint:
rules:
duplicate-ids: error # off, warn, error (default)

Enabled by the presets: github-actions/actionlint.

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

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
actionlint id/duplicate full
actionlint syntax-check/duplicate-job partial partial