A GitHub Action that formats shell scripts using shfmt.
on:
push:
branches:
- main
jobs:
format-shell-scripts:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: ryohidaka/action-sh-format@v0.3.2
with:
path: "."
indent: 4
commit-user-name: "GitHub Actions"
commit-user-email: "actions@github.com"
commit-message: "chore: Format ShellScripts"
dry-run: false
Input | Description | Required | Default |
---|---|---|---|
path |
Directory path to format shell scripts. | ✅ | . |
indent |
Set the indentation level for shfmt. | 4 |
|
commit-user-name |
Commit username. | GitHub Actions |
|
commit-user-email |
Commit email. | actions@github.com |
|
commit-message |
Commit message. | chore: Format ShellScripts |
|
dry-run |
If true, the commit and push steps will be skipped. | false |
This project is licensed under the MIT License - see the LICENSE file for details.