1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

CI: Support obsolete versions of Debian like Debian 9

To continue testing PHP 5.6 through PHP 7.0
This commit is contained in:
Nick Liu 2023-06-14 13:14:13 -05:00
parent c2bc635774
commit fb7ee9efaf
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -56,9 +56,16 @@ jobs:
steps:
- name: Enable Debian backports
run: |
if ! apt-get update; then
sed -i 's#/\(deb\|security\)\.debian\.org/#/archive.debian.org/#g' /etc/apt/sources.list
sed -r -i '/^[^\s#]*[^\s]+\s+[^\s]+\s+[^#]*-updates/d' /etc/apt/sources.list
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-obsolete
echo 'Acquire::AllowInsecureRepositories "true";' >> /etc/apt/apt.conf.d/99ignore-obsolete
echo 'APT::Get::AllowUnauthenticated "true";' >> /etc/apt/apt.conf.d/99ignore-obsolete
apt-get update
fi
apt-get install -y debian-archive-keyring
grep -m1 -P '^deb http://deb.debian.org/debian [a-z]+ main' /etc/apt/sources.list |
grep -m1 -P '^deb http://(deb|archive).debian.org/debian [a-z]+ main' /etc/apt/sources.list |
awk '$3 = $3"-backports"' >> /etc/apt/sources.list
- name: Update operating system software repository
@ -67,7 +74,7 @@ jobs:
- name: Install operating system dependencies
run: |
DEBIAN_RELEASE=$(
grep -m1 -P '^deb http://deb.debian.org/debian [a-z]+ main' /etc/apt/sources.list |
grep -m1 -P '^deb http://(deb|archive).debian.org/debian [a-z]+ main' /etc/apt/sources.list |
awk '{print $3}'
)
USE_GIT_BPO="$(. /etc/os-release && test $VERSION_ID -lt 10 && echo "-t ${DEBIAN_RELEASE}-backports" || echo)"