From dbfbaac9a3be96ae348467e46c53637a691336d3 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Sun, 12 Nov 2023 02:43:28 +0100 Subject: [PATCH] GitHub Actions: add shellcheck to PR workflow This reports shellcheck output for *changed* lines. Preexisting problems are not reported. --- .github/workflows/pr-review.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pr-review.yml diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml new file mode 100644 index 0000000..19ea46d --- /dev/null +++ b/.github/workflows/pr-review.yml @@ -0,0 +1,40 @@ +# PR Review workflows. +# The intention is for these to only find *new* issues. + +name: pr-review +on: + pull_request: +jobs: + + shellcheck-code: + name: shellcheck grml-debootstrap + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + path: "." + pattern: | + chroot-script + grml-debootstrap + config + tests/shellcheck-stub-debootstrap-variables + check_all_files_with_shebangs: "false" + + shellcheck-tests: + name: shellcheck test scripts + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + path: "." + pattern: | + tests/* + check_all_files_with_shebangs: "false" -- 2.1.4