From 4e509663123e56dd6e98374646808ebff07d5482 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Sat, 4 Feb 2023 15:01:05 +0100 Subject: [PATCH] ci(lint): add shell linter - Differential ShellCheck It performs differential ShellCheck scans and report results directly on GitHub. documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck Signed-off-by: Jan Macku --- .github/workflows/differential-shellcheck.yml | 34 +++++++++++++++++++ 1 file changed, 34 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..96a9f2e --- /dev/null +++ b/.github/workflows/differential-shellcheck.yml @@ -0,0 +1,34 @@ +name: Differential ShellCheck +on: + push: + pull_request: + branches: [ master ] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + + permissions: + security-events: write + + steps: + - name: Repository checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - id: ShellCheck + name: Differential ShellCheck + uses: redhat-plumbers-in-action/differential-shellcheck@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - if: ${{ always() }} + name: Upload artifact with ShellCheck defects in SARIF format + uses: actions/upload-artifact@v3 + with: + name: Differential ShellCheck SARIF + path: ${{ steps.ShellCheck.outputs.sarif }}