From 7ed9f1971a29443cd5728e94e6b8a5dd77bee1d4 Mon Sep 17 00:00:00 2001 From: Ishan Rai Date: Sat, 27 Jun 2020 15:37:37 +0530 Subject: [PATCH] Add github actions for shell check --- .github/workflows/check_shell_script.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/check_shell_script.yml diff --git a/.github/workflows/check_shell_script.yml b/.github/workflows/check_shell_script.yml new file mode 100644 index 000000000..d9483356a --- /dev/null +++ b/.github/workflows/check_shell_script.yml @@ -0,0 +1,22 @@ +name: Check Shell Script Syntax + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.2.0 + - name: Get Diff Action + uses: technote-space/get-diff-action@v1.2.8 + with: + SUFFIX_FILTER: .sh + - name: Install ShellCheck + run: | + sudo apt-get install shellcheck + if: env.GIT_DIFF + - name: Lint with ShellCheck + run: | + shellcheck --shell=bash -x ${{ env.GIT_DIFF }} + if: env.GIT_DIFF