diff --git a/.github/workflows/filename-check.yml b/.github/workflows/filename-check.yml index 0438b18f..d34a3d78 100644 --- a/.github/workflows/filename-check.yml +++ b/.github/workflows/filename-check.yml @@ -1,22 +1,17 @@ name: Filename Check -on: [push, pull_request] +on: [push] jobs: check-filenames: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Check filenames for Windows compatibility # currently restricted to doc folder - run: | - with_capitals=$(find doc -type f \( -iname "*.md" -o -iname "*.png" \) | grep -E '/[A-Z]') - # with_invalid_chars=$(find . -type f | grep -E '[<>:"/\\|?*]|[[:cntrl:]]') - # if [ ! -z "$with_capitals" ] || [ ! -z "$with_invalid_chars" ]; then - if [ ! -z "$with_capitals" ]; then - echo "The following files do not follow the naming convention:" - [ ! -z "$with_capitals" ] && echo "Files with capitals:" && echo "$with_capitals" - # [ ! -z "$with_invalid_chars" ] && echo "Files with Windows-restricted characters:" && echo "$with_invalid_chars" - exit 1 - fi + - uses: actions/checkout@v2 + - name: Check for capital letters in filenames in 'doc/manual' + run: | + files_with_caps=$(find doc/manual -type f | grep '[A-Z]') + if [ ! -z "$files_with_caps" ]; then + echo "Files with capital letters:" + echo "$files_with_caps" + exit 1 + fi