mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-08-29 06:40:10 +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
|
||||
echo "Compressing: $file"
|
||||
if ! optipng -o7 -nc "$file" >/dev/null 2>&1; then
|
||||
STATUS=$?
|
||||
if [[ $STATUS -gt 2 ]]; then
|
||||
echo "FAILED: $file (exit code $STATUS)"
|
||||
FAILED_FILES+="$file"$'\n'
|
||||
else
|
||||
echo "Skipped (already optimized or warning): $file"
|
||||
fi
|
||||
fi
|
||||
done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user