This commit is contained in:
Shivam Mathur
2020-02-13 09:51:54 +05:30
commit 546224a999
26 changed files with 8591 additions and 0 deletions

24
src/cache.ts Normal file
View File

@@ -0,0 +1,24 @@
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.getInput('php-version', true);
const extensions: string = 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();