-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60ece0a
commit d05df67
Showing
2 changed files
with
35 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
name: Search & Destroy evenodds | ||
name: Check evenodds | ||
|
||
on: | ||
push: | ||
paths: | ||
- "icons/**" | ||
workflow_dispatch: | ||
# push: | ||
# paths: | ||
# - "icons/**" | ||
pull_request: | ||
branches: | ||
- production | ||
paths: | ||
- "icons/**" | ||
|
||
jobs: | ||
build: | ||
check_evenodd: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Buscar palabra en archivos SVG | ||
- name: Checkout del código | ||
uses: actions/checkout@v2 | ||
|
||
- name: Search for evenodd icons | ||
run: | | ||
ICONS_DIR="icons" | ||
files_with_evenodd="" | ||
for file in $(find icons -name "*.svg"); do | ||
for file in $(find $ICONS_DIR -name "*.svg"); do | ||
if grep -q "evenodd" "$file"; then | ||
# echo "Se encontró la palabra 'evenodd' en $file" | ||
files_with_evenodd="${files_with_evenodd}${file}\n" | ||
# Remove the "icons/" part of the path | ||
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 "Archivos con 'evenodd':\n${files_with_evenodd}" | ||
exit 1 | ||
echo -e "\n\033[4mEvenodd icons\033[0m\n" | ||
echo -e "$files_with_evenodd" | ||
exit 1 # End the execution with an error code | ||
fi |
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