Skip to content

Commit

Permalink
git changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxedus authored Aug 18, 2024
1 parent 0b0ed82 commit c4ef0e8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/resize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Resize images
run: |
docker run -d --rm --name imagemagick -v $(pwd)/templates:/inn -e FOLDER='/inn/img/' -e WIDTH=192 -e HEIGHT=192 ghcr.io/linuxserver/baseimage-alpine:3.19
docker exec imagemagick bash -c 'apk add --no-cache imagemagick && for match in $(find $FOLDER/ -type f \( -iname \*.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 "github-actions[bot] <133769+github-actions[bot]@users.noreply.github.com>"
git config --global user.name "github-actions[bot]"
git commit -am "Automated Resizing of images" || :
git push || :
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated Resizing of images"
git push

0 comments on commit c4ef0e8

Please sign in to comment.