From a12303e9688214d254c49b6f724678255666a87c Mon Sep 17 00:00:00 2001 From: Ashish Bhatia Date: Tue, 28 Mar 2023 01:27:35 -0700 Subject: [PATCH] Add Shell script linter to GitHub Actions --- .github/workflows/lint-shell-script.yaml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/lint-shell-script.yaml diff --git a/.github/workflows/lint-shell-script.yaml b/.github/workflows/lint-shell-script.yaml new file mode 100644 index 00000000..b28298c4 --- /dev/null +++ b/.github/workflows/lint-shell-script.yaml @@ -0,0 +1,35 @@ +--- +# Run this locally with act - https://github.com/nektos/act +# act -j lintShellScript +name: Lint Shell scripts + +on: # yamllint disable-line rule:truthy + push: + branches: [main, master] + paths: + - '**.sh' + - '**.bash' + - '.github/workflows/lint-shell-script.yaml' + pull_request: + branches: [main, master] + paths: + - '**.sh' + - '**.bash' + - '.github/workflows/lint-shell-script.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + lintShellScript: + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@2.0.0