mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Use mirror for ppa:ondrej/php on Ubuntu 16.04
Remove support for Ubuntu 16.04 self-hosted runners
This commit is contained in:
parent
9149639a33
commit
ef477a1dd7
@ -82,6 +82,10 @@ run_script() {
|
||||
# Function to install required packages on self-hosted runners.
|
||||
self_hosted_setup() {
|
||||
if [ "$runner" = "self-hosted" ]; then
|
||||
if [ "$DISTRIB_RELEASE" = "16.04" ] && [ "$CONTAINER" != "shivammathur/node" ]; then
|
||||
add_log "$cross" "Ubuntu" "Ubuntu 16.04 (Xenial Xerus) is no longer supported on self-hosted runner"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${version:?}" =~ $old_versions ]]; then
|
||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
exit 1
|
||||
|
@ -3,7 +3,7 @@ self_hosted_helper() {
|
||||
if ! command -v apt-fast >/dev/null; then
|
||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||
fi
|
||||
install_packages curl make software-properties-common unzip autoconf automake gcc g++
|
||||
install_packages apt-https-transport curl make software-properties-common unzip autoconf automake gcc g++
|
||||
add_ppa ondrej/php
|
||||
}
|
||||
|
||||
@ -21,13 +21,17 @@ cleanup_lists() {
|
||||
# Function to add ppa:ondrej/php.
|
||||
add_ppa() {
|
||||
ppa=${1:-ondrej/php}
|
||||
if ! apt-cache policy | grep -q "$ppa"; then
|
||||
if [ "$DISTRIB_RELEASE" = "16.04" ] && [ "$ppa" = "ondrej/php" ]; then
|
||||
LC_ALL=C.UTF-8 sudo apt-add-repository --remove ppa:"$ppa" -y || true
|
||||
LC_ALL=C.UTF-8 sudo apt-add-repository http://setup-php.com/ondrej/php/ubuntu -y
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 4f4ea0aae5267a6c
|
||||
elif ! apt-cache policy | grep -q "$ppa"; then
|
||||
cleanup_lists "$(dirname "$ppa")"
|
||||
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:"$ppa" -y
|
||||
fi
|
||||
if [ "$DISTRIB_RELEASE" = "16.04" ]; then
|
||||
sudo "$debconf_fix" apt-get update
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to update the package lists.
|
||||
|
Loading…
Reference in New Issue
Block a user