Files
cache-extensions/src/cache.ts
Shivam Mathur f55a0043ab Add support for PHP 8.1
Add support for alias latest

Bump version to 1.3.0
2020-10-13 14:22:54 +05:30

29 lines
783 B
TypeScript

import {exec} from '@actions/exec/lib/exec';
import * as core from '@actions/core';
import * as path from 'path';
import * as utils from './utils';
/**
* Run the script
*/
export async function run(): Promise<void> {
try {
const version: string = await utils.parseVersion(
await utils.getInput('php-version', true)
);
const extensions: string = await utils.filterExtensions(
await utils.getInput('extensions', true)
);
const key: string = await utils.getInput('key', true);
const script_path: string = path.join(__dirname, '../src/extensions.sh');
await exec(
'bash ' + script_path + ' "' + extensions + '" ' + key + ' ' + version
);
} catch (error) {
core.setFailed(error.message);
}
}
// call the run function
run();