2020-08-21 12:19:26 +02:00
|
|
|
name: Shellcheck
|
2020-08-29 07:14:28 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
paths:
|
|
|
|
- '**.sh'
|
2021-06-24 18:01:46 +02:00
|
|
|
- '.github/workflows/shellcheck.yml'
|
2020-08-29 07:14:28 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
paths:
|
|
|
|
- '**.sh'
|
2021-06-24 17:30:16 +02:00
|
|
|
- '.github/workflows/shellcheck.yml'
|
2020-08-17 16:46:52 +02:00
|
|
|
|
2022-08-18 14:30:11 +02:00
|
|
|
concurrency:
|
2022-08-23 16:15:50 +02:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
2022-08-18 14:30:11 +02:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
|
2020-08-17 16:46:52 +02:00
|
|
|
jobs:
|
2020-09-01 15:34:44 +02:00
|
|
|
ShellCheck:
|
2020-08-17 16:46:52 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-20 23:39:25 +01:00
|
|
|
- uses: actions/checkout@v4
|
2020-08-17 16:46:52 +02:00
|
|
|
- name: Install Shellcheck
|
|
|
|
run: sudo apt-get install -y shellcheck
|
|
|
|
- name: DoShellcheck
|
2022-11-23 14:33:29 +01:00
|
|
|
run: shellcheck -V && shellcheck -e SC2181 -e SC2089 **/*.sh && echo "shellcheck OK"
|
2020-09-01 15:34:44 +02:00
|
|
|
|
|
|
|
shfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-20 23:39:25 +01:00
|
|
|
- uses: actions/checkout@v4
|
2020-08-17 16:46:52 +02:00
|
|
|
- name: Install shfmt
|
2020-08-17 16:52:59 +02:00
|
|
|
run: curl -sSL https://github.com/mvdan/sh/releases/download/v3.1.2/shfmt_v3.1.2_linux_amd64 -o ~/shfmt && chmod +x ~/shfmt
|
2020-08-17 16:46:52 +02:00
|
|
|
- name: shfmt
|
|
|
|
run: ~/shfmt -l -w -i 2 . ; git diff --exit-code && echo "shfmt OK"
|