diff --git a/.gitea/workflows/compressimages.yml b/.gitea/workflows/compressimages.yml index 55812ef..bf6e072 100644 --- a/.gitea/workflows/compressimages.yml +++ b/.gitea/workflows/compressimages.yml @@ -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: |