From 729fcb475657ce70a4cb8637531ca2ab4346b2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Sat, 3 Oct 2020 13:55:11 +0200 Subject: [PATCH] Added the option to specify php-version: latest --- dist/index.js | 3 +++ src/install.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/index.js b/dist/index.js index 8afc200d..3422accd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2506,6 +2506,9 @@ exports.build = build; async function run() { try { let version = await utils.getInput('php-version', true); + if (version === 'latest') { + version = '7.4'; + } version = version.length > 1 ? version.slice(0, 3) : version + '.0'; const os_version = process.platform; // check the os version and run the respective script diff --git a/src/install.ts b/src/install.ts index 046204e3..60ab29ae 100644 --- a/src/install.ts +++ b/src/install.ts @@ -62,6 +62,9 @@ export async function build( export async function run(): Promise { try { let version: string = await utils.getInput('php-version', true); + if (version === 'latest') { + version = '7.4'; + } version = version.length > 1 ? version.slice(0, 3) : version + '.0'; const os_version: string = process.platform;