Skip to content

Commit ae1e9bd

Browse files
Apply template config updates
1 parent 9b9e5b9 commit ae1e9bd

4 files changed

Lines changed: 74 additions & 24 deletions

File tree

.github/workflows/check-images.yml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,48 +23,51 @@ jobs:
2323
run: |
2424
unused=()
2525
26-
# Find all images in the root and `images/` directory (if it exists)
27-
images=$(find . -maxdepth 1 -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.svg" -o -iname "*.gif" \) -printf "%P\n")
26+
# Find all images in the root directory
27+
for img in *.png *.jpg *.jpeg *.svg *.gif; do
28+
[ -f "$img" ] && images="$images $img"
29+
done
30+
31+
# Find all images in the images/ directory (if it exists)
2832
if [ -d "./images" ]; then
29-
images+=" $(find ./images -type f \( -iname "*.png" -o -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.svg" -o -iname "*.gif" \) -printf "%P\n")"
33+
for img in ./images/*.png ./images/*.jpg ./images/*.jpeg ./images/*.svg ./images/*.gif; do
34+
[ -f "$img" ] && images="$images $img"
35+
done
36+
fi
37+
38+
# Check if root README.md exists
39+
if [ ! -f "./README.md" ]; then
40+
echo "README.md not found in root directory - skipping image check"
41+
exit 0
3042
fi
3143
32-
# Loop through each image to check if it's referenced in any README files
44+
# Loop through each image to check if it's referenced in the root README.md
3345
for img in $images; do
34-
found=false
35-
while IFS= read -r -d '' readme_file; do
36-
if grep -q "!\[.*\](.*$img.*)" "$readme_file"; then
37-
found=true
38-
break
39-
fi
40-
done < <(find . -iname "readme.md" -print0)
46+
# Normalize path: remove leading ./
47+
normalized_img="${img#./}"
4148
42-
if [ "$found" = false ]; then
43-
unused+=("$img")
49+
# Check if the image is referenced in README.md
50+
if ! grep -q "$normalized_img" "./README.md"; then
51+
unused+=("$normalized_img")
4452
fi
4553
done
4654
4755
# Check if there are any unused images
4856
if [ ${#unused[@]} -gt 0 ]; then
49-
echo "Unused images found that are not referenced in any README files:"
57+
echo "Unused images found that are not referenced in the root README.md:"
5058
echo "## Unused Images" >> $GITHUB_STEP_SUMMARY
5159
echo "" >> $GITHUB_STEP_SUMMARY
5260
echo "| Image Name | Path |" >> $GITHUB_STEP_SUMMARY
5361
echo "|------------|------|" >> $GITHUB_STEP_SUMMARY
5462
5563
for img in "${unused[@]}"; do
56-
if [[ -f "./$img" ]]; then
57-
path="./$img"
58-
else
59-
path="./images/$img"
60-
fi
6164
name=$(basename "$img")
62-
echo "$name -> $path"
65+
echo "$name -> $img"
6366
64-
echo "| $name | $path |" >> $GITHUB_STEP_SUMMARY
67+
echo "| $name | $img |" >> $GITHUB_STEP_SUMMARY
6568
done
6669
6770
exit 1
6871
else
69-
echo "No unused images found that are not referenced in README files!"
72+
echo "No unused images found that are not referenced in the root README.md!"
7073
fi

.github/workflows/check-readme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
uses: actions/checkout@v6
2121

2222
- name: Check links in README
23+
uses: lycheeverse/lychee-action@v2
2324
continue-on-error: true
24-
uses: lycheeverse/lychee-action@v1
2525
with:
2626
args: --verbose --no-progress './**/[Rr][Ee][Aa][Dd][Mm][Ee].md' --exclude-file .lycheeignore
2727
fail: true

ASP.NET Core/ASP.NET Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</Target>
2121

2222
<ItemGroup>
23-
<PackageReference Include="DevExtreme.AspNet.Core" Version="25.1.*" />
23+
<PackageReference Include="DevExtreme.AspNet.Core" Version="25.2.*" />
2424
</ItemGroup>
2525

2626
</Project>

ASP.NET Core/package-lock.json

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)