Change code to make it more extandable in future

This commit is contained in:
Ivan Zosimov (Akvelon INC) 2022-02-22 14:55:30 +03:00
parent d450effe85
commit f2efd31d13
7 changed files with 75 additions and 44 deletions

View file

@ -21,13 +21,15 @@ export async function run() {
}
const cachePackages = async () => {
const cachingFlag = core.getInput('cache');
const cachingFlag = core.getBooleanInput('cache');
if (!cachingFlag) return;
const packageManager = core.getInput('package-manager');
const state = core.getState(State.CacheMatchedKey);
const primaryKey = core.getState(State.CachePrimaryKey);
const packageManagerInfo = await getPackageManagerInfo();
const packageManagerInfo = await getPackageManagerInfo(packageManager);
const cachePath = await getCacheDirectoryPath(packageManagerInfo);