Fix touching reasonable images (#296)

This commit is contained in:
Roxedus 2023-09-17 15:58:14 +02:00 committed by GitHub
parent 7cb3c6e4cc
commit 7e4e1a61ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"