mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-08-29 14:50:23 +02:00
simplify logic
This commit is contained in:
parent
ff781d6503
commit
1249f8b168
5
.github/workflows/optimize-images.yml
vendored
5
.github/workflows/optimize-images.yml
vendored
@ -24,13 +24,8 @@ jobs:
|
|||||||
while IFS= read -r -d '' file; do
|
while IFS= read -r -d '' file; do
|
||||||
echo "Compressing: $file"
|
echo "Compressing: $file"
|
||||||
if ! optipng -o7 -nc "$file" >/dev/null 2>&1; then
|
if ! optipng -o7 -nc "$file" >/dev/null 2>&1; then
|
||||||
STATUS=$?
|
|
||||||
if [[ $STATUS -gt 2 ]]; then
|
|
||||||
echo "FAILED: $file (exit code $STATUS)"
|
echo "FAILED: $file (exit code $STATUS)"
|
||||||
FAILED_FILES+="$file"$'\n'
|
FAILED_FILES+="$file"$'\n'
|
||||||
else
|
|
||||||
echo "Skipped (already optimized or warning): $file"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0)
|
done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user