Skip to content

YamlLoadError

YAML loading error.

Defined by ValidationRule which supports workflows, actions, invalid content in the "Internal" ruleset along with YamlSyntaxError, JsonSchemaValidation.

Description

A semantically correct YAML file is required to ensure the GH-Lint object model is valid.

Fix the problems in the workflow file to make it a valid workflow or action YAML file.

GitHub would also very likely reject the file with an error message similar to:

Invalid workflow file: .github/workflows/test.yml#L5
The workflow is not valid. .github/workflows/test.yml (Line: 5, Col: 17): Error message

Compliant example

Valid yaml file.

example.yml

on: push
jobs:
  example:
    uses: reusable/workflow.yml

Non-compliant example

Jobs is required for a workflow, otherwise the work cannot be declared.

example.yml

on: push

  • Line 1: File example.yml could not be loaded:
    java.lang.IllegalStateException: Missing required key: jobs in [on]