aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2022-02-01 09:34:02 +0100
committerJan Macku <jamacku@redhat.com>2022-02-02 14:59:55 +0100
commitd1f848f56e74dce12a6910f675a5310bd0275a25 (patch)
tree9015b889e09fec600e42c1c5eb95bdee9367fb7e
parentb519893b9aa52ec08c6b112271c666f4a6384b12 (diff)
downloadinitscripts-d1f848f56e74dce12a6910f675a5310bd0275a25.tar
initscripts-d1f848f56e74dce12a6910f675a5310bd0275a25.tar.gz
initscripts-d1f848f56e74dce12a6910f675a5310bd0275a25.tar.bz2
initscripts-d1f848f56e74dce12a6910f675a5310bd0275a25.tar.xz
initscripts-d1f848f56e74dce12a6910f675a5310bd0275a25.zip
ci: Use Differential ShellCheck action
(cherry picked from commit 3eee59032cd3f1793d13fe16dbd609d350d5fbb7)
-rw-r--r--.github/.diff-shellcheck-exceptions.txt (renamed from .github/workflows/exception-list.txt)0
-rw-r--r--.github/.diff.shellcheck-scripts.txt (renamed from .github/workflows/script-list.txt)0
-rw-r--r--.github/workflows/shellcheck_test.yml31
-rw-r--r--README.md8
4 files changed, 20 insertions, 19 deletions
diff --git a/.github/workflows/exception-list.txt b/.github/.diff-shellcheck-exceptions.txt
index 5b093820..5b093820 100644
--- a/.github/workflows/exception-list.txt
+++ b/.github/.diff-shellcheck-exceptions.txt
diff --git a/.github/workflows/script-list.txt b/.github/.diff.shellcheck-scripts.txt
index 053672df..053672df 100644
--- a/.github/workflows/script-list.txt
+++ b/.github/.diff.shellcheck-scripts.txt
diff --git a/.github/workflows/shellcheck_test.yml b/.github/workflows/shellcheck_test.yml
index 6ad63a58..40436b6f 100644
--- a/.github/workflows/shellcheck_test.yml
+++ b/.github/workflows/shellcheck_test.yml
@@ -1,28 +1,23 @@
-# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
-name: Shellcheck test
+name: Differential ShellCheck
on:
+ push:
+ branches: [master, rhel*-branch]
pull_request:
- branches:
- - master
- - rhel*-branch
+ branches: [master, rhel*-branch]
jobs:
shellCheck:
runs-on: ubuntu-20.04
- defaults:
- run:
- shell: bash
- steps:
- - name: Install dependencies
- run: sudo apt update && sudo apt-get install -y cmake help2man libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev tree
- - name: Clone csdiff repository
- run: cd ../ && git clone --depth=1 https://github.com/csutils/csdiff.git && cd -
- - name: Build and install csdiff
- run: cd ../csdiff && sudo make && sudo make install && cd -
- - name: Repository checkout
+
+ steps:
+ - name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- - name: Run shell-check test
- run: bash ./.github/workflows/check-shell.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
+
+ - name: Differential ShellCheck
+ uses: redhat-plumbers-in-action/differential-shellcheck@v1
+ with:
+ ignored-codes: .github/.diff-shellcheck-exceptions.txt
+ shell-scripts: .github/.diff.shellcheck-scripts.txt
diff --git a/README.md b/README.md
index 9f7c27ad..60196c1d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,10 @@
-# initscripts | [![Build Status](https://github.com/fedora-sysv/initscripts/workflows/Integration%20test/badge.svg)](https://github.com/fedora-sysv/initscripts/actions?query=workflow%3AIntegration+test) [![Shellcheck Status](https://github.com/fedora-sysv/initscripts/workflows/Shellcheck%20test/badge.svg)](https://github.com/fedora-sysv/initscripts/actions?query=workflow%3AShellcheck+test)
+# initscripts
+
+[![Build Status](https://github.com/fedora-sysv/initscripts/workflows/Integration%20test/badge.svg)](https://github.com/fedora-sysv/initscripts/actions?query=workflow%3AIntegration+test) [![Differential ShellCheck](https://github.com/fedora-sysv/initscripts/actions/workflows/shellcheck_test.yml/badge.svg)](https://github.com/fedora-sysv/initscripts/actions/workflows/shellcheck_test.yml) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fedora-sysv/initscripts.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fedora-sysv/initscripts/alerts/) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/fedora-sysv/initscripts.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fedora-sysv/initscripts/context:python) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/fedora-sysv/initscripts.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fedora-sysv/initscripts/context:cpp) [![Mergify Status][mergify-status]][mergify]
+
+[mergify]: https://mergify.io
+[mergify-status]: https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/fedora-sysv/initscripts&style=flat
+
This repository contains source code for **legacy** *System V [initscripts](https://en.wikipedia.org/wiki/Init)*,
which are primarily used in *[Linux](https://en.wikipedia.org/wiki/Linux) distributions like e.g.*:
* [Fedora](https://en.wikipedia.org/wiki/Fedora_(operating_system))