Skip to content

TWiStErRob/net.twisterrob.ghlint

Repository files navigation

GitHub Actions validator

This is a CLI utility to semantically validate GitHub Actions workflows files.

Why?

There are many other tools checking the syntax of YAML files, or validating against the SchemaStore github-workflow shema, but none of them are tailored for easily writable custom semantic rules. This tool aims to fill the gap.

It is heavily inspired by detekt, PSI, and Object Calisthenics.

Features

  • Validate the syntax of the workflow YAML files via JSON-schema (this is required for other steps).
  • Hand-crafted semantic rules and strongly typed object model.
  • Opinionated workflow file formatter.
  • GitHub Action to make it easier to select which files.
  • Support for the full workflow syntax. Hopefully via generated code based on the JSON-schema.
  • Custom third-party rules (plugins)
  • action.yml validator via JSON-schema
  • action.yml semantic rules
  • support for other types (e.g. issue templates/forms)

Usage

Alternatives

  • mpalmer/action-validator is a JSON schema validator for GitHub Actions including some additional checks, like glob validation.
  • yamllint is a syntax and formatting checker for YAML files.
  • If you know any others, feel free to PR.