Normalize check actions #57
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 evenodds | |
on: | |
push: | |
paths: | |
- "icons/**" | |
pull_request: | |
branches: | |
- production | |
paths: | |
- "icons/**" | |
jobs: | |
check_evenodd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout del código | |
uses: actions/checkout@v2 | |
- name: Buscar palabra en archivos SVG | |
run: | | |
ICONS_DIR="icons" | |
files_with_evenodd="" | |
for file in $(find $ICONS_DIR -name "*.svg"); do | |
if grep -q "evenodd" "$file"; then | |
# Quitar la parte "icons/" de la ruta | |
file_without_icons="${file#$ICONS_DIR/}" | |
files_with_evenodd="${files_with_evenodd}\033[0;31m× $file_without_icons\033[0m\n" | |
fi | |
done | |
if [ -n "$files_with_evenodd" ]; then | |
echo -e "\n\033[4mEvenodd icons\033[0m\n" | |
echo -e "$files_with_evenodd \n" | |
exit 1 | |
fi |