mirror of
https://github.com/linuxserver/docker-templates.git
synced 2026-02-05 10:58:52 +08:00
Fix touching reasonable images (#296)
This commit is contained in:
parent
7cb3c6e4cc
commit
7e4e1a61ed
4
.github/workflows/size.yml
vendored
4
.github/workflows/size.yml
vendored
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user