-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b97bb85
Showing
7 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# github: illvart | ||
patreon: illvart | ||
custom: ["https://www.paypal.me/illvart", "https://www.buymeacoffee.com/illvart", "https://saweria.co/illvart"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 30 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- accepted | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed in 7 days if no further activity occurs. | ||
To prevent this from happening, leave a comment. | ||
# Comment to post when closing a stale Issue or Pull Request. | ||
closeComment: > | ||
Closing this issue because it has been marked as stale for more than 7 days. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.9-slim-buster | ||
|
||
LABEL "com.github.actions.name"="Bash shell beautifier" | ||
LABEL "com.github.actions.description"="Run beautysh to beautify a bash shell scripts code." | ||
LABEL "com.github.actions.icon"="code" | ||
LABEL "com.github.actions.color"="green" | ||
|
||
LABEL "repository"="https://github.com/illvart/beautysh-action" | ||
LABEL "homepage"="https://github.com/illvart/beautysh-action" | ||
LABEL "maintainer"="illvart" | ||
|
||
RUN pip install beautysh | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 illvart | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Bash shell beautifier | ||
|
||
[![Release](https://img.shields.io/github/v/release/illvart/beautysh-action?color=orange)](https://github.com/illvart/beautysh-action/releases) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/illvart/beautysh-action/blob/main/LICENSE) | ||
[![Marketplace](https://img.shields.io/badge/GitHub-Marketplace-blue.svg)](https://github.com/marketplace/actions/bash-shell-beautifier) | ||
|
||
A GitHub Action that runs [beautysh](https://github.com/lovesegfault/beautysh) for beautify a bash shell scripts code. | ||
|
||
## Usage | ||
|
||
To use this action in your repository, create a file like `.github/workflows/ci.yml` with the following example: | ||
|
||
```yaml | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
beautify: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
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@v4 | ||
with: | ||
commit_message: '[auto] ci: apply beautysh changes' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
``` | ||
If there is no `args` option it will fallback into `*.sh`. | ||
|
||
To avoid errors when project directory doesn't have an `*.sh` file, you can pass it with `&>/dev/null`. | ||
|
||
For a full list of possible `args` checkout the [beautysh docs](https://github.com/lovesegfault/beautysh#usage). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Bash shell beautifier' | ||
description: 'Run beautysh to beautify a bash shell scripts code.' | ||
author: 'illvart' | ||
|
||
branding: | ||
icon: 'code' | ||
color: 'green' | ||
|
||
inputs: | ||
args: | ||
description: 'Arguments provided to beautysh' | ||
required: false | ||
default: '*.sh' | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.args }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
set -e | ||
sh -c "beautysh $*" |