]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci(lint): add differential-shellcheck action
authorJan Macku <jamacku@redhat.com>
Tue, 3 Oct 2023 08:17:22 +0000 (10:17 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 2 Apr 2024 14:39:42 +0000 (10:39 -0400)
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 <jamacku@redhat.com>
.github/workflows/lint.yml

index 0ca237e5b370b37dc2a90570e52d3605e6263d67..f8f08faaddd27b44d6902703622bde60edc8a4a4 100644 (file)
@@ -22,6 +22,30 @@ jobs:
           sh_checker_shellcheck_disable: false
           sh_checker_comment: true
 
+  differential-shellcheck:
+    runs-on: ubuntu-latest
+
+    permissions:
+      security-events: write
+
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+
+      - id: ShellCheck
+        name: Differential ShellCheck
+        uses: redhat-plumbers-in-action/differential-shellcheck@v5
+        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 }}
+
   lint-c:
     runs-on: ubuntu-latest