From 00145be09e9c3629f32edfa161fc53cf7a85a4be Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 9 Mar 2023 13:24:28 -0500 Subject: [PATCH] Add github action to shellcheck master on push and PRs --- .github/workflows/shellcheck.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/shellcheck.yml diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000000..96773089ae --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,24 @@ +--- +name: Shellcheck + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + shellcheck: + name: Check shell scripts + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install dependencies + run: | + sudo apt update && sudo apt install -y shellcheck + + - name: shellcheck + run: | + git grep -l '^#!\(/bin/\|/usr/bin/env \)\(sh\|bash\|dash\|ksh\)' | xargs shellcheck