shellcheck.yml 893 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - develop
  6. paths:
  7. - '**.sh'
  8. pull_request:
  9. branches:
  10. - develop
  11. paths:
  12. - '**.sh'
  13. jobs:
  14. shellcheck:
  15. runs-on: ubuntu-latest
  16. env:
  17. LANG: C.UTF-8
  18. container:
  19. image: docker.io/ubuntu:24.04
  20. steps:
  21. - name: Check out pull request code
  22. uses: actions/checkout@v4
  23. if: github.event_name == 'pull_request'
  24. with:
  25. repository: ${{ github.event.pull_request.head.repo.full_name }}
  26. - name: Check out repository code
  27. uses: actions/checkout@v4
  28. if: github.event_name == 'push'
  29. - name: Install shellcheck
  30. run: apt update && apt install -y shellcheck bash && shellcheck --version
  31. - name: Check shell scripts
  32. run: shopt -s globstar && ls **/*.sh && shellcheck -x -P "SCRIPTDIR" --severity=info **/*.sh
  33. shell: bash