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.

38 lines
953 B

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