Add back apt-cacher-ng support for faster builds
Some checks failed
Build ostree packages from sid to trixie / Build ostree packages (push) Failing after 12s

- Restore apt-cacher-ng detection and configuration like composefs CI
- Use proxy sources when apt-cacher-ng is available (192.168.1.101:3142)
- Fallback to standard Debian mirrors when apt-cacher-ng is not available
- This should resolve the GPG key verification issues
- Follows the same pattern as the working composefs CI
This commit is contained in:
robojerk 2025-09-06 11:29:59 -07:00
parent 71f1e86f84
commit 61e89d04a7

View file

@ -27,11 +27,20 @@ jobs:
run: | run: |
echo "Setting up Debian environment for building..." echo "Setting up Debian environment for building..."
# Add Debian repositories # Try apt-cacher-ng first, fallback to Debian's automatic mirror selection
echo "Adding Debian unstable repositories..." echo "Checking for apt-cacher-ng availability..."
echo "deb http://deb.debian.org/debian unstable main" | sudo tee /etc/apt/sources.list.d/debian-unstable.list
echo "deb-src http://deb.debian.org/debian unstable main" | sudo tee -a /etc/apt/sources.list.d/debian-unstable.list # Quick check with timeout to avoid hanging
if timeout 10 curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
echo "✅ apt-cacher-ng is available, configuring proxy sources..."
echo "deb http://192.168.1.101:3142/ftp.debian.org/debian unstable main" | sudo tee /etc/apt/sources.list.d/debian-unstable.list
echo "deb-src http://192.168.1.101:3142/ftp.us.debian.org/debian unstable main" | sudo tee -a /etc/apt/sources.list.d/debian-unstable.list
else
echo "⚠️ apt-cacher-ng not available, using standard Debian mirrors..."
echo "deb http://deb.debian.org/debian unstable main" | sudo tee /etc/apt/sources.list.d/debian-unstable.list
echo "deb-src http://deb.debian.org/debian unstable main" | sudo tee -a /etc/apt/sources.list.d/debian-unstable.list
fi
# Add Debian keyring # Add Debian keyring
sudo apt update sudo apt update
sudo apt install -y debian-archive-keyring sudo apt install -y debian-archive-keyring