CI: CentOS 7 vault.centos.org repo fix for Docker validate-on-os

This commit is contained in:
master3395
2026-02-15 04:02:01 +01:00
parent c8747de503
commit f06d6c7c71

View File

@@ -105,6 +105,7 @@ jobs:
- name: Validate on ${{ matrix.os }} (${{ matrix.image }})
run: |
docker run --rm \
-e IMAGE="${{ matrix.image }}" \
-v "$PWD:/repo:ro" \
-w /repo \
"${{ matrix.image }}" \
@@ -116,6 +117,13 @@ jobs:
apt-get install -y -qq python3 python3-pip >/dev/null
pip3 install -q requests
else
if [ "$IMAGE" = "centos:7" ]; then
for r in /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-*.repo; do
[ -f "$r" ] || continue
sed -i "s|^mirrorlist=|#mirrorlist=|g" "$r"
sed -i "s|^#*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" "$r"
done
fi
if command -v dnf >/dev/null 2>&1; then
dnf install -y -q python3 python3-pip
else