richardphibel / rpms / systemd

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