mirror of
https://github.com/ludeeus/action-shellcheck.git
synced 2024-08-16 10:09:53 +02:00
142c6d53df
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev> |
||
---|---|---|
.github/workflows | ||
testfiles | ||
.gitattributes | ||
action.yaml | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
runaction.sh |
ShellCheck
GitHub action for ShellCheck.
Example
on:
push:
branch:
- master
name: 'Trigger: Push action'
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
Globally disable checks
To disable specific checks add it to a SHELLCHECK_OPTS
env key in the job definition.
example:
...
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -e SC2059 -e SC2034 -e SC1090
Ignore paths
You can use the ignore
input to disable specific directories.
sample structure:
sample/directory/with/files/toignore/test.sh
sample/directory/with/files/test.sh
example:
...
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore: toignore
This will skip sample/directory/with/files/toignore/test.sh
Minimum severity of errors to consider (error, warning, info, style)
You can use the severity
input to not fail until specified severity is met, for example fail only if there are errors in scripts but ignore styling, info and warnings.
example:
...
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
severity: error