Skip to content

About

GitHub Action to validate .playbook.md files on pull requests

Resources

Stars

0 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

PLAYBOOK.md Validate Action

License: MIT GitHub stars GitHub Marketplace

PLAYBOOK.md Validated

Features

  • Validates all .playbook.md files in your repository on pull requests
  • Reports errors and warnings as inline PR annotations
  • Writes a summary table to the GitHub Actions job summary
  • Supports custom glob patterns and strict mode
  • Uses @playbook-md/core directly -- no external dependencies required on the runner

Usage

Basic

Validate all .playbook.md files in your repository:

name: Validate Playbooks
on: [pull_request]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: PLAYBOOK-MD/playbook-action@v1

Custom pattern

Validate playbooks in a specific directory:

- uses: PLAYBOOK-MD/playbook-action@v1
  with:
    pattern: 'workflows/**/*.playbook.md'

Strict mode

Treat warnings as errors (fail the check if any warnings are found):

- uses: PLAYBOOK-MD/playbook-action@v1
  with:
    strict: 'true'

Using outputs

Access validation results in subsequent steps:

- uses: PLAYBOOK-MD/playbook-action@v1
  id: validate
- run: |
    echo "Valid: ${{ steps.validate.outputs.valid }}"
    echo "Total: ${{ steps.validate.outputs.total }}"
    echo "Errors: ${{ steps.validate.outputs.errors }}"
    echo "Warnings: ${{ steps.validate.outputs.warnings }}"

Inputs

Input Description Required Default
pattern Glob pattern for playbook files to validate No **/*.playbook.md
strict Treat warnings as errors No false

Outputs

Output Description
valid Whether all playbooks are valid (true/false)
total Total number of playbooks validated
errors Total number of errors found
warnings Total number of warnings found

Summary

The action writes a markdown summary table to $GITHUB_STEP_SUMMARY, visible on the Actions run page:

File Status Errors Warnings
workflows/review.playbook.md Valid 0 0
workflows/deploy.playbook.md Invalid 2 1

Total: 2 file(s) validated, 2 error(s), 1 warning(s)

Annotations

Errors and warnings appear as inline annotations on the pull request diff, pointing to the exact file and line where the issue was found.

Badge

Add a badge to your repository README:

![PLAYBOOK.md Validated](https://img.shields.io/badge/PLAYBOOK.md-validated-FF5F1F)

Development

Prerequisites

  • Node.js 20+
  • npm

Setup

npm install

Build

The action must be bundled into dist/index.js before committing. This bundles all dependencies into a single file so the action runs without node_modules.

npm run build

Type checking

npm run typecheck

License

MIT

About

GitHub Action to validate .playbook.md files on pull requests

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages