NAME

App::Project::Doctor::Check::GitHubActions - Validate GitHub Actions workflows

DESCRIPTION

Uses App::Workflow::Lint to validate every .yml/.yaml file under .github/workflows/. A fix via App::GHGen::Generator is offered when no files exist.

METHODS

check( $context )

Validates all GitHub Actions workflow YAML files.

API SPECIFICATION

Input

$context : App::Project::Doctor::Context

Output

List of App::Project::Doctor::Finding --
  info    when .github/workflows/ is absent (CI check owns the error),
  warning (fixable) when directory exists but contains no YAML,
  one error per lint violation found,
  pass    when all workflow files validate cleanly.

MESSAGES

Code | Trigger                       | Resolution
-----|-------------------------------|-------------------------------------
G001 | workflows/ has no YAML files  | Fix generates a workflow via App::GHGen::Generator
G002 | Lint error in a workflow file | Edit the file to correct syntax

FORMAL SPECIFICATION

check : Context -> [Finding]
check ctx ==
  if not exists WORKFLOW_DIR then [info]
  else if |workflow_files| = 0 then [warning+fix]
  else concat { lint_errors f | f <- workflow_files }
       ++ (if all clean then [pass] else [])

AUTHOR

Nigel Horne <njh@nigelhorne.com>

LICENSE

Copyright (C) 2026 Nigel Horne. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.