Skip to content

MatthewMckee4/action-format

action-format

codecov

A fast GitHub Actions workflow formatter written in Rust.

Features

  • 2-space indentation - Normalizes all indentation to 2 spaces
  • Step separation - Adds blank lines between workflow steps for readability
  • Comment preservation - Keeps your comments exactly where they are
  • Fast - Formats 500-line workflows in under 100ms

Installation

# macOS and Linux
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/MatthewMckee4/action-format/releases/0.0.0-alpha.0/download/action-format-installer.sh | sh
# Windows
powershell -ExecutionPolicy Bypass -c "irm https://github.com/MatthewMckee4/action-format/releases/0.0.0-alpha.0/download/action-format-installer.ps1 | iex"

Usage

Run from your repository root. The tool automatically finds and formats all YAML files in .github/workflows/.

# Format all workflows
action-format

# Check without modifying
action-format --check

# Show diff
action-format --diff

About

An opinionated GitHub action formatter

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published