diff --git a/README.md b/README.md index fdd71ca1..6110ac17 100644 --- a/README.md +++ b/README.md @@ -58,14 +58,13 @@ Setup PHP with required extensions, php.ini configuration, code-coverage support |Virtual environment|YAML workflow label|Pre-installed PHP| |--- |--- |--- | -|Ubuntu 16.04|`ubuntu-16.04`|`PHP 5.6` to `PHP 8.0`| +|Ubuntu 16.04 [(deprecated)](https://setup-php.com/i/452)|`ubuntu-16.04`|`PHP 5.6` to `PHP 8.0`| |Ubuntu 18.04|`ubuntu-18.04`|`PHP 7.1` to `PHP 8.0`| |Ubuntu 20.04|`ubuntu-latest` or `ubuntu-20.04`|`PHP 7.4` to `PHP 8.0`| |Windows Server 2019|`windows-latest` or `windows-2019`|`PHP 8.0`| |macOS 10.15 Catalina|`macos-latest` or `macos-10.15`|`PHP 8.0`| |macOS 11.0 Big Sur|`macos-11.0`|`PHP 8.0`| - ## :heavy_plus_sign: PHP Extension Support - On `ubuntu` by default extensions which are available as a package can be installed. If the extension is not available as a package but it is on `PECL`, it can be installed by specifying `pecl` in the tools input. - On `windows` extensions which have `windows` binary on `PECL` can be installed. diff --git a/dist/index.js b/dist/index.js index d85eeee9..c9037c80 100644 --- a/dist/index.js +++ b/dist/index.js @@ -444,6 +444,9 @@ async function run() { core.setFailed('PHP 8.1 is not supported on setup-php v1.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2'); return; } + if ((await utils.readEnv('ImageOS')) == 'ubuntu16') { + core.warning('Ubuntu 16.04 is deprecated.\nPlease upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452'); + } if (version) { const os_version = process.platform; let script_path = ''; diff --git a/src/install.ts b/src/install.ts index 29b8f38f..d036b0fc 100644 --- a/src/install.ts +++ b/src/install.ts @@ -67,6 +67,11 @@ export async function run(): Promise { ); return; } + if ((await utils.readEnv('ImageOS')) == 'ubuntu16') { + core.warning( + 'Ubuntu 16.04 is deprecated.\nPlease upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452' + ); + } if (version) { const os_version: string = process.platform; // check the os version and run the respective script