Merge pull request 'Update .gitea/workflows/compressimages.yml' (#8) from rajendra into main
Reviewed-on: #8
This commit is contained in:
@@ -26,6 +26,13 @@ jobs:
|
||||
optimize:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# 🚀 Use your internal image (no apt needed)
|
||||
container:
|
||||
image: git.wdipl.com/wdi-public/image-optimizer:latest
|
||||
credentials:
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
steps:
|
||||
# 🔀 Decide branch (PR vs manual)
|
||||
- name: Determine Branch
|
||||
@@ -44,33 +51,6 @@ jobs:
|
||||
fetch-depth: 0
|
||||
ref: ${{ steps.branch.outputs.branch }}
|
||||
|
||||
# 🚀 FIX: Ubuntu 24 mirror replacement (covers .list + .sources)
|
||||
- name: Use faster apt mirror
|
||||
run: |
|
||||
echo "🔧 Replacing apt mirrors..."
|
||||
|
||||
sudo find /etc/apt -type f -name "*.list" \
|
||||
-exec sed -i 's|http://archive.ubuntu.com|http://in.archive.ubuntu.com|g' {} +
|
||||
sudo find /etc/apt -type f -name "*.list" \
|
||||
-exec sed -i 's|http://security.ubuntu.com|http://in.archive.ubuntu.com|g' {} +
|
||||
|
||||
sudo find /etc/apt -type f -name "*.sources" \
|
||||
-exec sed -i 's|http://archive.ubuntu.com|http://in.archive.ubuntu.com|g' {} +
|
||||
sudo find /etc/apt -type f -name "*.sources" \
|
||||
-exec sed -i 's|http://security.ubuntu.com|http://in.archive.ubuntu.com|g' {} +
|
||||
|
||||
# 🔍 Debug (optional but useful)
|
||||
- name: Verify apt sources
|
||||
run: |
|
||||
echo "🔍 Current apt sources:"
|
||||
grep -r "ubuntu.com" /etc/apt || true
|
||||
|
||||
# 📦 Install tools
|
||||
- name: Install Image Tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y imagemagick jpegoptim pngquant
|
||||
|
||||
# 🖼 Resize images
|
||||
- name: Resize Oversized Images
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user