teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0832-ci-lint-add-shell-linter-Differential-ShellCheck.patch

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