init
This commit is contained in:
24
src/cache.ts
Normal file
24
src/cache.ts
Normal 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();
|
||||
Reference in New Issue
Block a user