code-server-php8 update/add workflows

This commit is contained in:
aptalca
2023-05-17 13:43:55 -04:00
parent dd4dba276a
commit 16e046f66a
9 changed files with 68 additions and 86 deletions
-10
View File
@@ -1,10 +0,0 @@
#!/usr/bin/with-contenv bash
ppa="ppa:ondrej/php"
if ! grep -q "^deb .*${ppa}" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
echo "**** adding ppa ondrej/php ****"
if ! dpkg -l | grep software-properties-common > /dev/null; then
apt-get update && apt-get install -y software-properties-common
fi
add-apt-repository ${ppa} -y
fi
-3
View File
@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
apt-get update
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/with-contenv bash
echo "**** installing php8 and composer ****"
apt-get install -y \
composer \
php8.0
@@ -1,22 +1,12 @@
#!/usr/bin/with-contenv bash
source /etc/lsb-release
if [ "${DISTRIB_CODENAME}" = "bionic" ] || [ "${DISTRIB_CODENAME}" = "focal" ]; then
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y --no-install-recommends gnupg
fi
if [ ! -f "/etc/apt/sources.list.d/php8source.list" ]; then
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 14aa40ec0831756756d7f66c4f4ea0aae5267a6c
echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu ${DISTRIB_CODENAME} main" \
> /etc/apt/sources.list.d/php8source.list
echo "**** Adding php8.1 and composer to package install list ****"
echo "\
php8.1 \
composer" >> /mod-repo-packages-to-install.list
fi
elif ! dpkg -l | grep php > /dev/null || ! dpkg -l | grep composer > /dev/null; then
echo "**** Adding php and composer to package install list ****"
if [ ! -f "/etc/apt/sources.list.d/php8source.list" ]; then
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/php8.gpg --keyserver keyserver.ubuntu.com --recv-keys 14aa40ec0831756756d7f66c4f4ea0aae5267a6c
echo "deb [signed-by=/usr/share/keyrings/php8.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu ${DISTRIB_CODENAME} main" \
> /etc/apt/sources.list.d/php8source.list
echo "**** Adding php8.2 and composer to package install list ****"
echo "\
php \
php8.2 \
composer" >> /mod-repo-packages-to-install.list
fi