04e329
From 5f69ba3919d32ed93c68bb6b8b70a516f2bb56a8 Mon Sep 17 00:00:00 2001
04e329
From: Jan Macku <jamacku@redhat.com>
04e329
Date: Tue, 16 Aug 2022 14:34:49 +0200
04e329
Subject: [PATCH] ci(lint): add shell linter - Differential ShellCheck
04e329
04e329
It performs differential ShellCheck scans and report results directly in
04e329
pull request.
04e329
04e329
documentation:
04e329
https://github.com/redhat-plumbers-in-action/differential-shellcheck
04e329
04e329
(inspired by commit
04e329
 https://github.com/systemd/systemd/commit/3f3c718e79abdac698ae90de5cd4c0560a0a75d4)
04e329
04e329
RHEL-only
04e329
04e329
Related: #2122499
04e329
---
04e329
 .github/workflows/differential-shellcheck.yml | 31 +++++++++++++++++++
04e329
 1 file changed, 31 insertions(+)
04e329
 create mode 100644 .github/workflows/differential-shellcheck.yml
04e329
04e329
diff --git a/.github/workflows/differential-shellcheck.yml b/.github/workflows/differential-shellcheck.yml
04e329
new file mode 100644
04e329
index 0000000000..fa94679b51
04e329
--- /dev/null
04e329
+++ b/.github/workflows/differential-shellcheck.yml
04e329
@@ -0,0 +1,31 @@
04e329
+---
04e329
+# https://github.com/redhat-plumbers-in-action/differential-shellcheck#readme
04e329
+
04e329
+name: Differential ShellCheck
04e329
+on:
04e329
+  pull_request:
04e329
+    branches:
04e329
+      - master
04e329
+      - rhel-8.*.0
04e329
+
04e329
+permissions:
04e329
+  contents: read
04e329
+
04e329
+jobs:
04e329
+  lint:
04e329
+    runs-on: ubuntu-latest
04e329
+
04e329
+    permissions:
04e329
+      security-events: write
04e329
+      pull-requests: write
04e329
+
04e329
+    steps:
04e329
+      - name: Repository checkout
04e329
+        uses: actions/checkout@v3
04e329
+        with:
04e329
+          fetch-depth: 0
04e329
+
04e329
+      - name: Differential ShellCheck
04e329
+        uses: redhat-plumbers-in-action/differential-shellcheck@v3
04e329
+        with:
04e329
+          token: ${{ secrets.GITHUB_TOKEN }}