Skip to content

format python with black #1

format python with black

format python with black #1

name: Python Black Formatter
on:
workflow_call:
inputs:
command:
type: string
required: false
default: 'black .'
jobs:
format:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Format with Black
run: |
python -m pip install --upgrade pip
pip install black
${{ github.event.inputs.command }}
-
name: Commit changes
uses: NelsonDane/Custom-GitHub-Actions/.github/workflows/commit-to-github.yml@main
with:
message: "Auto-format with Black"