1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

CI: More reliable Debian codename parsing

Remains compatible with Debian 9 but also supports Debian 12, which
has switched to the deb822 APT sources format
This commit is contained in:
Nick Liu 2023-06-14 13:31:57 -05:00
parent fb7ee9efaf
commit 8a1a129c14
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

View File

@ -73,13 +73,10 @@ jobs:
- name: Install operating system dependencies - name: Install operating system dependencies
run: | run: |
DEBIAN_RELEASE=$( . /etc/os-release
grep -m1 -P '^deb http://(deb|archive).debian.org/debian [a-z]+ main' /etc/apt/sources.list | DEBIAN_RELEASE="$(echo "$VERSION" | grep -oP '^[^(]+\(\K[^)]+')"
awk '{print $3}' USE_GIT_BPO="$(test $VERSION_ID -lt 10 && echo "-t ${DEBIAN_RELEASE}-backports" || echo)"
) apt-get $USE_GIT_BPO install -y git zip libzip-dev libbz2-dev libpng-dev libjpeg-dev libwebp-dev libvpx-dev libicu-dev
USE_GIT_BPO="$(. /etc/os-release && test $VERSION_ID -lt 10 && echo "-t ${DEBIAN_RELEASE}-backports" || echo)"
apt-get $USE_GIT_BPO install -y git
apt-get -t "${DEBIAN_RELEASE}-backports" install -y zip libzip-dev libbz2-dev libpng-dev libjpeg-dev libwebp-dev libvpx-dev libicu-dev
- name: Configure PHP gd extension with default bundle - name: Configure PHP gd extension with default bundle
run: | run: |