Skip to content

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

Bash
1
2
# 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
Bash
1
2
# 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/.

Bash
1
2
3
4
5
6
7
8
# Format all workflows
action-format

# Check without modifying
action-format --check

# Show diff
action-format --diff