From 1249f8b1687959cc3c48cd4892df10c333b76fcb Mon Sep 17 00:00:00 2001 From: boubou19 Date: Thu, 24 Jul 2025 11:55:08 +0200 Subject: [PATCH] simplify logic --- .github/workflows/optimize-images.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index cc3a7a1..5b16a5f 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -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 + echo "FAILED: $file (exit code $STATUS)" + FAILED_FILES+="$file"$'\n' fi done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0)