Add demo file and checks #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check asset file names | |
on: pull_request | |
jobs: | |
Filenamecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- shell: bash | |
run: | | |
find assets -maxdepth 1 | grep "\.[A-Z]" && echo "ERROR: Ensure file extensions are in lowercase" && exit 1 || echo "" | |
find assets -maxdepth 1 -type f -printf '%f\n' | grep "[_+& ]" && echo "ERROR: No special characters, except hyphen, are allowed in file names" && exit 1 || echo "" | |
find assets -maxdepth 1 -type f -printf '%f\n' | grep -v "[-]" && echo "ERROR: No hyphen found in file names. Include hyphens to separate words e.g. storefront-checkbox.png" && exit 1 || echo "" |