DEV Community

Maroun Maroun
Maroun Maroun

Posted on • Updated on


My First GitHub Action!

I wrote a GitHub action for running ShellCheck on shell files in your PR.


Create a file checker.yml inside .github/workflows:

on: [pull_request]

    runs-on: ubuntu-latest
    name: Shell Checker
      - uses: actions/checkout@v2
      - uses: marounmaroun/shell-checker@v1
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          severity: 'info'
          exclude: ''

You can set the severity to one of: "error, warning, info, style". Default is "info".

You can also include type of warnings to exclude. For example:

exclude: 'SC2006,SC2148'

Default value is not set, meaning that there will be no exclusions.

Code is available here:

Top comments (0)

Regex for lazy developers

regex for lazy devs

You know who you are. Sorry for the callout 😆