From ff06db210acff196ae582fa260b0b04d53a9bbb8 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 23 Apr 2024 18:38:03 +0200 Subject: [PATCH 1/2] ci(lint): add shell linter - Differential ShellCheck It performs differential ShellCheck scans and reports results directly on GitHub. documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck Signed-off-by: Jan Macku --- .github/workflows/differential-shellcheck.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/differential-shellcheck.yml diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml new file mode 100644 index 0000000..e1966d0 --- /dev/null +++ b/.github/workflows/differential-shellcheck.yml @@ -0,0 +1,27 @@ +name: Differential ShellCheck +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + + permissions: + security-events: write + + steps: + - name: Repository checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Differential ShellCheck + uses: redhat-plumbers-in-action/differential-shellcheck@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 44d185a436d1e1b475d511adb1424df96d55b0c7 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Tue, 23 Apr 2024 18:42:22 +0200 Subject: [PATCH 2/2] ci: add shellcheckrc - set default shell to bash --- .shellcheckrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .shellcheckrc diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 0000000..90e42b5 --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1,2 @@ +# Tell ShellCheck to use bash when checking scripts +shell=bash