Update .gitea/workflows/compressimages.yml
Some checks failed
CI / ci (push) Has been cancelled

This commit is contained in:
2026-04-16 10:30:49 +00:00
parent 76b9c63cd4
commit d235e79b3d

View File

@@ -42,6 +42,12 @@ jobs:
fetch-depth: 0
ref: ${{ steps.branch.outputs.branch }}
# 🚀 FAST MIRROR (India)
- name: Use faster apt mirror
run: |
sudo sed -i 's|http://archive.ubuntu.com/ubuntu|http://in.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo sed -i 's|http://security.ubuntu.com/ubuntu|http://in.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
- name: Install Image Tools
run: |
sudo apt-get update
@@ -50,16 +56,22 @@ jobs:
- name: Resize Oversized Images
run: |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) \
-not -path "*/.git/*" \
-not -path "*/node_modules/*" \
-exec mogrify -resize 1920x1920\> {} \;
- name: Optimize JPEG
run: |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) \
-not -path "*/.git/*" \
-not -path "*/node_modules/*" \
-exec jpegoptim --strip-all --max=85 {} \;
- name: Optimize PNG
run: |
find . -type f -iname "*.png" \
-not -path "*/.git/*" \
-not -path "*/node_modules/*" \
-exec pngquant --force --ext .png --quality=75-90 {} \;
- name: Commit changes