-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from azohra/feature/update_branding_and_readme
Updated the branding of the action and README doc
- Loading branch information
Showing
4 changed files
with
51 additions
and
19 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
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 |
---|---|---|
@@ -1,28 +1,57 @@ | ||
# Magic Shell Linter Action | ||
# Shell Linter | ||
|
||
This action executes lint check on bash scripts | ||
|
||
<br> | ||
|
||
## Inputs | ||
|
||
### `path` | ||
A GitHub Action that performs static analysis for shell scripts using [ShellCheck](https://github.com/koalaman/shellcheck). | ||
|
||
Required. Path to the bash script. | ||
 | ||
|
||
<br> | ||
|
||
## Example usage | ||
## Usage | ||
|
||
Shell Linter can perform static analysis in various ways. You can use it to lint all the shell scripts in your project or lint a a specific file or folder using the `path` parameter. Specific use cases are shown below: | ||
|
||
Run static analysis for all of the shell scripts. | ||
```yml | ||
jobs: | ||
# Run job that executes the bash script | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Lint check | ||
uses: azohra/magic-shell-linter-action@master | ||
uses: azohra/shell-linter@v0.1.0 | ||
``` | ||
Run static analysis for a single shell script. | ||
```yml | ||
- name: Lint check | ||
uses: azohra/shell-linter@v0.1.0 | ||
with: | ||
path: "setup.sh" | ||
``` | ||
Run static analysis for multiple shell scripts. | ||
```yml | ||
- name: Lint check | ||
uses: azohra/shell-linter@v0.1.0 | ||
with: | ||
path: "template.sh" | ||
path: "setup.sh,deploy.sh" | ||
``` | ||
Run static analysis for all the shell scripts in a folder. | ||
```yml | ||
- name: Lint check | ||
uses: azohra/shell-linter@v0.1.0 | ||
with: | ||
path: "src" | ||
``` | ||
<br> | ||
## Input | ||
### `path` | ||
|
||
Optional. Execute lint check on a specific file or folder. Default: `.` | ||
|
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
name: 'Magic Shell Linter' | ||
description: 'Execute lint check on Bash scripts' | ||
name: 'Shell Linter' | ||
description: 'Execute lint check on shell scripts using ShellCheck' | ||
author: 'ep-mobile' | ||
inputs: | ||
path: | ||
description: 'Path to the bash scripts that need the lint check.' | ||
description: 'Execute lint check on a specific file or folder.' | ||
required: false | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.path }} | ||
- ${{ inputs.path }} | ||
branding: | ||
icon: 'check-circle' | ||
color: 'green' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.