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.4.0
with:
path: "."
indent: 4
commit-user-name: "github-actions[bot]"
commit-user-email: "41898282+github-actions[bot]@users.noreply.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[bot] |
|
commit-user-email |
Commit email. | 41898282+github-actions[bot]@users.noreply.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.