Skip to content

Commit

Permalink
static-file-name-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanmrzan100 committed Jan 12, 2025
1 parent ca5a706 commit 6f08dbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
paths:
- '**/*.md'
- '**/*.jpg'
- '**/*.png'
- '**/*.jpeg'
- '**/*.svg'

jobs:
kebab-case-check:
Expand All @@ -25,15 +29,15 @@ jobs:
echo -e "${Blue} Checking all changed Markdown files ..."
changed_files=$(git diff --name-only HEAD^1 HEAD | grep '\.md$')
changed_files=$(git diff --name-only HEAD^1 HEAD | grep -E '\.(md|jpg|png|jpeg|svg)$')
if [ -z "$changed_files" ]; then
echo -e "${Green} No changed Markdown files in this PR.${Reset}"
echo -e "${Green} No changed files in this PR.${Reset}"
exit 0
fi
x=1
echo -e "${Blue} Changed Markdown files are :${Reset}"
echo -e "${Blue} Changed static files are :${Reset}"
echo "$changed_files" | while read -r file; do
dir=$(dirname "$file")
base=$(basename "$file")
Expand Down
File renamed without changes
File renamed without changes

0 comments on commit 6f08dbe

Please sign in to comment.