Improve dependencies cache usage

This commit is contained in:
Gustavo Bastos 2022-08-12 12:42:43 +02:00
parent 5b36705a13
commit 2d1721088f
6 changed files with 79 additions and 8 deletions

View file

@ -15,6 +15,7 @@ async function run() {
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
const cache = core.getInput(constants.INPUT_CACHE);
const cacheKeyPrefix = core.getInput(constants.INPUT_CACHE_KEY_PREFIX);
const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false);
const installerOptions: JavaInstallerOptions = {
@ -43,7 +44,7 @@ async function run() {
await auth.configureAuthentication();
if (cache && isCacheFeatureAvailable()) {
await restore(cache);
await restore(cache, cacheKeyPrefix);
}
} catch (error) {
core.setFailed(error.message);