Skip to content

Commit

Permalink
Merge pull request #3 from azohra/feature/update_branding_and_readme
Browse files Browse the repository at this point in the history
Updated the branding of the action and README doc
  • Loading branch information
Azbagheri authored Nov 1, 2019
2 parents ad542f1 + 22ffad9 commit 7702a5b
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From ubuntu:18.04
FROM alpine:3.10.3

RUN apt-get update \
&& apt-get install -qy shellcheck
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
apk update && apk add --no-cache shellcheck bash

COPY entrypoint.sh /entrypoint.sh

Expand Down
53 changes: 41 additions & 12 deletions README.md
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.
![](docs/images/preview.png)

<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: `.`

11 changes: 7 additions & 4 deletions action.yml
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'
Binary file added docs/images/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7702a5b

Please # to comment.