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.

33 lines
821 B

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