From 7e4e1a61eddfa69b57f1eb1c2b8e7dbcb8b2e96a Mon Sep 17 00:00:00 2001 From: Roxedus Date: Sun, 17 Sep 2023 15:58:14 +0200 Subject: [PATCH] Fix touching reasonable images (#296) --- .github/workflows/size.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index a032753..4764d26 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -18,8 +18,8 @@ jobs: - name: Resize images run: | - docker run -d --rm --name imagemagick -v $(pwd)/linuxserver.io:/inn -e FILES='/inn/img/*' ghcr.io/linuxserver/baseimage-alpine:3.18 - docker exec imagemagick bash -c 'apk add --no-cache imagemagick && for file in $FILES-logo.png; do convert $file -resize 192x192\> $file; done && for file in $FILES-icon.png; do convert $file -resize 192x192\> $file; done' + docker run -d --rm --name imagemagick -v $(pwd)/linuxserver.io:/inn -e FOLDER='/inn/img/' -e WIDTH=192 -e HEIGHT=192 ghcr.io/linuxserver/baseimage-alpine:3.18 + docker exec imagemagick bash -c 'apk add --no-cache imagemagick && for match in $(find $FOLDER/ -type f \( -iname \*-logo.png -o -iname \*-icon.png \)); do SIZE=$(identify -format "%w-%h" $match); WDT=${SIZE%-*}; HGT=${SIZE#*-}; if (( $WDT > $WIDTH )) || (( $HGT > $HEIGHT )); then convert -define exclude-chunk=tIME $match -resize $WIDTHx$HEIGHT\> $match; fi; done' docker stop imagemagick git config --global user.email "ci@linuxserver.io"