My First GitHub Action!

marounmaroun

Maroun Maroun

Posted on May 29, 2020

My First GitHub Action!

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

Usage

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

on: [pull_request]

jobs:
  shell-check:
    runs-on: ubuntu-latest
    name: Shell Checker
    steps:
      - uses: actions/checkout@v2
      - uses: marounmaroun/shell-checker@v1
        with:
          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: https://github.com/MarounMaroun/shell-checker

💖 💪 🙅 🚩
marounmaroun
Maroun Maroun

Posted on May 29, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related