From: Chris Hofstaedtler Date: Sun, 12 Nov 2023 01:43:28 +0000 (+0100) Subject: GitHub Actions: add shellcheck to PR workflow X-Git-Tag: v0.105~8^2~1 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=dbfbaac9a3be96ae348467e46c53637a691336d3;hp=511ca11ea437116522463053718df41c761e8a51;p=grml-debootstrap.git GitHub Actions: add shellcheck to PR workflow This reports shellcheck output for *changed* lines. Preexisting problems are not reported. --- 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"