From 37baec84cae59195cf331860d55abb793054c79b Mon Sep 17 00:00:00 2001 From: Prokopenko Andrey Date: Thu, 16 Sep 2021 19:16:27 +0200 Subject: [PATCH] shellcheck workflow added --- .github/workflows/shellcheck.yml | 24 ++++++++++++++++++++++++ hetzner-debian10-zfs-setup.sh | 2 +- hetzner-debian11-zfs-setup.sh | 2 +- hetzner-ubuntu18-zfs-setup.sh | 2 +- hetzner-ubuntu20-zfs-setup.sh | 2 +- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/shellcheck.yml diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..3986c6d --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,24 @@ +name: CI + +on: + push: + branches: [master, develop] + pull_request: + branches: [master] + +jobs: + Shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + + steps: + - name: Code checkout + uses: actions/checkout@v2 + + - name: Check scripts with Shellcheck + uses: essentialkaos/shellcheck-action@v1 + with: + files: src/hetzner-debian10-zfs-setup.sh src/hetzner-debian11-zfs-setup.sh src/hetzner-ubuntu18-zfs-setup.sh src/hetzner-ubuntu20-zfs-setup.sh + severity: error + format: gcc + shell: dash \ No newline at end of file diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 79957ab..d62bf32 100644 --- a/hetzner-debian10-zfs-setup.sh +++ b/hetzner-debian10-zfs-setup.sh @@ -499,7 +499,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - find /usr/local/sbin/ -type l | xargs rm + find /usr/local/sbin/ -type l -exec rm {} + zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index 04e316c..8677d3e 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -499,7 +499,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - find /usr/local/sbin/ -type l | xargs rm + find /usr/local/sbin/ -type l -exec rm {} + zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-ubuntu18-zfs-setup.sh b/hetzner-ubuntu18-zfs-setup.sh index f64ab31..057d6bf 100644 --- a/hetzner-ubuntu18-zfs-setup.sh +++ b/hetzner-ubuntu18-zfs-setup.sh @@ -466,7 +466,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - find /usr/local/sbin/ -type l | xargs rm + find /usr/local/sbin/ -type l -exec rm {} + zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 5343422..af9a749 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -466,7 +466,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - find /usr/local/sbin/ -type l | xargs rm + find /usr/local/sbin/ -type l -exec rm {} + zfs --version echo "======= partitioning the disk =========="