acme.sh/.github/workflows/shellcheck.yml

34 lines
873 B
YAML
Raw Normal View History

2020-08-21 10:19:26 +00:00
name: Shellcheck
2020-08-29 05:14:28 +00:00
on:
push:
branches:
- '*'
paths:
- '**.sh'
2021-06-24 16:01:46 +00:00
- '.github/workflows/shellcheck.yml'
2020-08-29 05:14:28 +00:00
pull_request:
branches:
- dev
paths:
- '**.sh'
2021-06-24 15:30:16 +00:00
- '.github/workflows/shellcheck.yml'
2020-08-17 14:46:52 +00:00
jobs:
2020-09-01 13:34:44 +00:00
ShellCheck:
2020-08-17 14:46:52 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Shellcheck
run: sudo apt-get install -y shellcheck
- name: DoShellcheck
run: shellcheck -V && shellcheck -e SC2181 **/*.sh && echo "shellcheck OK"
2020-09-01 13:34:44 +00:00
shfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2020-08-17 14:46:52 +00:00
- name: Install shfmt
2020-08-17 14:52:59 +00: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 14:46:52 +00:00
- name: shfmt
run: ~/shfmt -l -w -i 2 . ; git diff --exit-code && echo "shfmt OK"