From 5d5c50f283cc45e9160d606c99501e251739d941 Mon Sep 17 00:00:00 2001 From: Leo Ochoa Date: Thu, 26 May 2022 08:54:06 +0200 Subject: [PATCH] Add shellcheck This GH action checks (in every commit to main) the shell scripts. Will only flag `severity: error` level problems as failures. Feel free to add `warnings` as error too if you need so. --- .github/workflows/pre-main.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/pre-main.yaml diff --git a/.github/workflows/pre-main.yaml b/.github/workflows/pre-main.yaml new file mode 100644 index 000000000..a8a3a0133 --- /dev/null +++ b/.github/workflows/pre-main.yaml @@ -0,0 +1,22 @@ +name: Test Incoming Changes + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@master + env: + SHELLCHECK_OPTS: -e SC2068 + with: + ignore_names: bashrc + severity: error \ No newline at end of file