You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
701 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. name: Shellcheck
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. paths:
  7. - '**.sh'
  8. pull_request:
  9. branches:
  10. - dev
  11. paths:
  12. - '**.sh'
  13. jobs:
  14. formatCheck:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v2
  18. - name: Install Shellcheck
  19. run: sudo apt-get install -y shellcheck
  20. - name: DoShellcheck
  21. run: shellcheck -V && shellcheck -e SC2181 **/*.sh && echo "shellcheck OK"
  22. - name: Install shfmt
  23. run: curl -sSL https://github.com/mvdan/sh/releases/download/v3.1.2/shfmt_v3.1.2_linux_amd64 -o ~/shfmt && chmod +x ~/shfmt
  24. - name: shfmt
  25. run: ~/shfmt -l -w -i 2 . ; git diff --exit-code && echo "shfmt OK"