GitHub Actions Required property is missing: jobs
Required property is missing: jobs is the workflow parser telling you that the root of the file has no jobs key where it expects one. The key is usually present in the file and has simply stopped being at the root, which is why the message reads as absurd the first time you see it next to a file that obviously has jobs in it. The left panel is the root key table reproduced in the body of this…
The workflow parser indicates that the root of the YAML file is missing the "jobs" key, which is a required property. The error appears even though the "jobs" key is present in the file but has been moved under another key. This results in the workflow not running, and GitHub displays an invalid-file annotation against the commit.
The message at the bottom of the annotation may provide some clues, but it is not very helpful on its own. The annotation contains multiple lines, each pointing to a different key that has ended up in an unexpected location. If the annotation only contains the "jobs" missing property line, then the file genuinely lacks the "jobs" key.
Common causes include stray indentation at the root of the file, the header being lost in a merge or squash, the jobs block ending up under another key, or the file not being a legitimate workflow. To fix the issue, check column one for the first character of the first key, ensuring it is at the beginning of the line. Then, confirm the same for the "name," "on," and "jobs" keys, which should all be at the same level.
If additional unexpected values are reported, investigate those keys as they may indicate a missing wrapper. Once the root keys are restored, the job bodies can remain unchanged.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.