https://github.com/illvart/beautysh-action
A GitHub Action for beautysh.
https://github.com/illvart/beautysh-action
automation bash beautifier beautify code-quality developer-tools formatter github-action pretty-print shell shell-script
Last synced: 5 months ago
JSON representation
A GitHub Action for beautysh.
- Host: GitHub
- URL: https://github.com/illvart/beautysh-action
- Owner: illvart
- License: mit
- Created: 2020-11-13T20:21:48.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-18T00:25:21.000Z (about 3 years ago)
- Last Synced: 2024-12-01T02:05:43.467Z (over 1 year ago)
- Topics: automation, bash, beautifier, beautify, code-quality, developer-tools, formatter, github-action, pretty-print, shell, shell-script
- Language: Dockerfile
- Homepage: https://github.com/marketplace/actions/bash-shell-beautifier
- Size: 3.91 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# beautysh-action
**A GitHub Action for [beautysh](https://github.com/lovesegfault/beautysh)**
[](https://github.com/illvart/beautysh-action/releases)
[](LICENSE)
## Usage
To use this action in your repository, simply create a workflow file (for example `.github/workflows/ci.yml`) with content like this:
```yaml
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
beautify:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Run beautysh
uses: illvart/beautysh-action@latest
with:
# Pass beautysh options in args, for example:
args: '*.sh --indent-size 4'
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: 'ci: apply auto-fixes'
commit_options: '--no-verify'
commit_user_name: ${{ github.repository_owner }}
commit_user_email: ${{ github.repository_owner }}@users.noreply.github.com
```
If the `args` option is not provided, it defaults to `*.sh`.
To avoid errors when the project directory lacks an `*.sh` file, use `&>/dev/null`.
For a full list of `args`, check the [beautysh docs](https://github.com/lovesegfault/beautysh#usage).
## Supports
If you’re enjoying it or want to support development, feel free to donate. Thank you! ❤️
## Contributing
Want to contribute? Read the [Contributing](docs/CONTRIBUTING.md).
## License
Released under the [MIT License](LICENSE).