executable.yml1 525 B

12345678910111213141516171819202122
  1. name: Check executable
  2. on: [push]
  3. jobs:
  4. check:
  5. runs-on: ubuntu-latest
  6. name: Check all sh
  7. steps:
  8. - run: git config --global core.fileMode true
  9. - uses: actions/checkout@v3
  10. - shell: bash
  11. run: |
  12. shopt -s globstar;
  13. FAIL=0
  14. for file in **/*.sh; do
  15. if [ -f "${file}" ] && [ -r "${file}" ] && [ ! -x "${file}" ]; then
  16. echo "$file" is not executable;
  17. FAIL=1
  18. fi
  19. done
  20. exit ${FAIL}