Skip to content

Commit 50b7edd

Browse files
committed
feat: implement cache-dependency-path option to control caching dependency
1 parent 87c1c70 commit 50b7edd

File tree

7 files changed

+131
-44
lines changed

7 files changed

+131
-44
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ This action allows you to work with Java and Scala projects.
4141

4242
- `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predifined package managers. It can be one of "maven", "gradle" or "sbt".
4343

44+
- `cache-dependency-path`: The path to a dependency file: pom.xml, build.gradle, build.sbt, etc. This option can be used with the `cache` option. If this option is omitted, the action searches for the dependency file in the entire repository. This option supports wildcards and a list of file names for caching multiple dependencies.
45+
4446
#### Maven options
4547
The action has a bunch of inputs to generate maven's [settings.xml](https://maven.apache.org/settings.html) on the fly and pass the values to Apache Maven GPG Plugin as well as Apache Maven Toolchains. See [advanced usage](docs/advanced-usage.md) for more.
4648

@@ -114,10 +116,13 @@ Currently, the following distributions are supported:
114116

115117
### Caching packages dependencies
116118
The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
119+
117120
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, and `gradle/*.versions.toml`
118121
- maven: `**/pom.xml`
119122
- sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt`
120123

124+
When the option `cache-dependency-path` is specified, the hash is based on the matching file. This option supports wildcards and a list of file names, and is especially useful for monorepos.
125+
121126
The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs).
122127

123128
The cache input is optional, and caching is turned off by default.
@@ -131,6 +136,9 @@ steps:
131136
distribution: 'temurin'
132137
java-version: '17'
133138
cache: 'gradle'
139+
cache-dependency-path: | # optional
140+
sub-project/*.gradle*
141+
sub-project/**/gradle-wrapper.properties
134142
- run: ./gradlew build --no-daemon
135143
```
136144

@@ -143,6 +151,7 @@ steps:
143151
distribution: 'temurin'
144152
java-version: '17'
145153
cache: 'maven'
154+
cache-dependency-path: 'sub-project/pom.xml' # optional
146155
- name: Build with Maven
147156
run: mvn -B package --file pom.xml
148157
```
@@ -156,6 +165,9 @@ steps:
156165
distribution: 'temurin'
157166
java-version: '17'
158167
cache: 'sbt'
168+
cache-dependency-path: | # optional
169+
sub-project/build.sbt
170+
sub-project/project/build.properties
159171
- name: Build with SBT
160172
run: sbt package
161173
```

__tests__/cache.test.ts

Lines changed: 71 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as fs from 'fs';
66
import * as os from 'os';
77
import * as core from '@actions/core';
88
import * as cache from '@actions/cache';
9+
import * as glob from '@actions/glob';
910

1011
describe('dependency cache', () => {
1112
const ORIGINAL_RUNNER_OS = process.env['RUNNER_OS'];
@@ -64,13 +65,18 @@ describe('dependency cache', () => {
6465
ReturnType<typeof cache.restoreCache>,
6566
Parameters<typeof cache.restoreCache>
6667
>;
68+
let spyGlobHashFiles: jest.SpyInstance<
69+
ReturnType<typeof glob.hashFiles>,
70+
Parameters<typeof glob.hashFiles>
71+
>;
6772

6873
beforeEach(() => {
6974
spyCacheRestore = jest
7075
.spyOn(cache, 'restoreCache')
7176
.mockImplementation((paths: string[], primaryKey: string) =>
7277
Promise.resolve(undefined)
7378
);
79+
spyGlobHashFiles = jest.spyOn(glob, 'hashFiles');
7480
spyWarning.mockImplementation(() => null);
7581
});
7682

@@ -93,6 +99,7 @@ describe('dependency cache', () => {
9399

94100
await restore('maven');
95101
expect(spyCacheRestore).toHaveBeenCalled();
102+
expect(spyGlobHashFiles).toHaveBeenCalledWith('**/pom.xml');
96103
expect(spyWarning).not.toHaveBeenCalled();
97104
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
98105
});
@@ -110,6 +117,9 @@ describe('dependency cache', () => {
110117

111118
await restore('gradle');
112119
expect(spyCacheRestore).toHaveBeenCalled();
120+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
121+
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml'
122+
);
113123
expect(spyWarning).not.toHaveBeenCalled();
114124
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
115125
});
@@ -118,6 +128,9 @@ describe('dependency cache', () => {
118128

119129
await restore('gradle');
120130
expect(spyCacheRestore).toHaveBeenCalled();
131+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
132+
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml'
133+
);
121134
expect(spyWarning).not.toHaveBeenCalled();
122135
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
123136
});
@@ -127,18 +140,24 @@ describe('dependency cache', () => {
127140

128141
await restore('gradle');
129142
expect(spyCacheRestore).toHaveBeenCalled();
143+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
144+
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml'
145+
);
130146
expect(spyWarning).not.toHaveBeenCalled();
131147
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
132148
});
133-
});
134-
it('downloads cache based on buildSrc/Versions.kt', async () => {
135-
createDirectory(join(workspace, 'buildSrc'));
136-
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
149+
it('downloads cache based on buildSrc/Versions.kt', async () => {
150+
createDirectory(join(workspace, 'buildSrc'));
151+
createFile(join(workspace, 'buildSrc', 'Versions.kt'));
137152

138-
await restore('gradle');
139-
expect(spyCacheRestore).toHaveBeenCalled();
140-
expect(spyWarning).not.toHaveBeenCalled();
141-
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
153+
await restore('gradle');
154+
expect(spyCacheRestore).toHaveBeenCalled();
155+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
156+
'**/*.gradle*\n**/gradle-wrapper.properties\nbuildSrc/**/Versions.kt\nbuildSrc/**/Dependencies.kt\ngradle/*.versions.toml'
157+
);
158+
expect(spyWarning).not.toHaveBeenCalled();
159+
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
160+
});
142161
});
143162
describe('for sbt', () => {
144163
it('throws error if no build.sbt found', async () => {
@@ -153,6 +172,9 @@ describe('dependency cache', () => {
153172

154173
await restore('sbt');
155174
expect(spyCacheRestore).toHaveBeenCalled();
175+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
176+
'**/*.sbt\n**/project/build.properties\n**/project/**.scala\n**/project/**.sbt'
177+
);
156178
expect(spyWarning).not.toHaveBeenCalled();
157179
expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found');
158180
});
@@ -179,6 +201,47 @@ describe('dependency cache', () => {
179201
expect(firstCall).not.toBe(thirdCall);
180202
});
181203
});
204+
describe('cache-dependency-path', () => {
205+
it('throws error if no matching dependency file found', async () => {
206+
createFile(join(workspace, 'build.gradle.kts'));
207+
await expect(
208+
restore('gradle', 'sub-project/**/build.gradle.kts')
209+
).rejects.toThrow(
210+
`No file in ${projectRoot(
211+
workspace
212+
)} matched to [sub-project/**/build.gradle.kts], make sure you have checked out the target repository`
213+
);
214+
});
215+
it('downloads cache based on the specified pattern', async () => {
216+
createFile(join(workspace, 'build.gradle.kts'));
217+
createDirectory(join(workspace, 'sub-project1'));
218+
createFile(join(workspace, 'sub-project1', 'build.gradle.kts'));
219+
createDirectory(join(workspace, 'sub-project2'));
220+
createFile(join(workspace, 'sub-project2', 'build.gradle.kts'));
221+
222+
await restore('gradle', 'build.gradle.kts');
223+
expect(spyCacheRestore).toHaveBeenCalled();
224+
expect(spyGlobHashFiles).toHaveBeenCalledWith('build.gradle.kts');
225+
expect(spyWarning).not.toHaveBeenCalled();
226+
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
227+
228+
await restore('gradle', 'sub-project1/**/*.gradle*\n');
229+
expect(spyCacheRestore).toHaveBeenCalled();
230+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
231+
'sub-project1/**/*.gradle*'
232+
);
233+
expect(spyWarning).not.toHaveBeenCalled();
234+
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
235+
236+
await restore('gradle', '*.gradle*\nsub-project2/**/*.gradle*\n');
237+
expect(spyCacheRestore).toHaveBeenCalled();
238+
expect(spyGlobHashFiles).toHaveBeenCalledWith(
239+
'*.gradle*\nsub-project2/**/*.gradle*'
240+
);
241+
expect(spyWarning).not.toHaveBeenCalled();
242+
expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found');
243+
});
244+
});
182245
});
183246
describe('save', () => {
184247
let spyCacheSave: jest.SpyInstance<

dist/cleanup/index.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68438,28 +68438,29 @@ function findPackageManager(id) {
6843868438
/**
6843968439
* A function that generates a cache key to use.
6844068440
* Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"".
68441-
* If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-).
6844268441
* @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
6844368442
*/
68444-
function computeCacheKey(packageManager) {
68443+
function computeCacheKey(packageManager, cacheDependencyPath) {
6844568444
return __awaiter(this, void 0, void 0, function* () {
68446-
const hash = yield glob.hashFiles(packageManager.pattern.join('\n'));
68447-
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`;
68445+
const pattern = cacheDependencyPath ? cacheDependencyPath.trim().split('\n') : packageManager.pattern;
68446+
const fileHash = yield glob.hashFiles(pattern.join('\n'));
68447+
if (!fileHash) {
68448+
throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`);
68449+
}
68450+
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
6844868451
});
6844968452
}
6845068453
/**
6845168454
* Restore the dependency cache
6845268455
* @param id ID of the package manager, should be "maven" or "gradle"
68456+
* @param cacheDependencyPath The path to a dependency file
6845368457
*/
68454-
function restore(id) {
68458+
function restore(id, cacheDependencyPath) {
6845568459
return __awaiter(this, void 0, void 0, function* () {
6845668460
const packageManager = findPackageManager(id);
68457-
const primaryKey = yield computeCacheKey(packageManager);
68461+
const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath);
6845868462
core.debug(`primary key is ${primaryKey}`);
6845968463
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
68460-
if (primaryKey.endsWith('-')) {
68461-
throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
68462-
}
6846368464
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
6846468465
const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey);
6846568466
if (matchedKey) {
@@ -68636,7 +68637,7 @@ else {
6863668637
"use strict";
6863768638

6863868639
Object.defineProperty(exports, "__esModule", ({ value: true }));
68639-
exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0;
68640+
exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0;
6864068641
exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home';
6864168642
exports.INPUT_JAVA_VERSION = 'java-version';
6864268643
exports.INPUT_JAVA_VERSION_FILE = 'java-version-file';
@@ -68655,6 +68656,7 @@ exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase';
6865568656
exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined;
6865668657
exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
6865768658
exports.INPUT_CACHE = 'cache';
68659+
exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path';
6865868660
exports.INPUT_JOB_STATUS = 'job-status';
6865968661
exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
6866068662
exports.M2_DIR = '.m2';

dist/setup/index.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103643,28 +103643,29 @@ function findPackageManager(id) {
103643103643
/**
103644103644
* A function that generates a cache key to use.
103645103645
* Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"".
103646-
* If there is no file matched to {@link PackageManager.path}, the generated key ends with a dash (-).
103647103646
* @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key}
103648103647
*/
103649-
function computeCacheKey(packageManager) {
103648+
function computeCacheKey(packageManager, cacheDependencyPath) {
103650103649
return __awaiter(this, void 0, void 0, function* () {
103651-
const hash = yield glob.hashFiles(packageManager.pattern.join('\n'));
103652-
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${hash}`;
103650+
const pattern = cacheDependencyPath ? cacheDependencyPath.trim().split('\n') : packageManager.pattern;
103651+
const fileHash = yield glob.hashFiles(pattern.join('\n'));
103652+
if (!fileHash) {
103653+
throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`);
103654+
}
103655+
return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`;
103653103656
});
103654103657
}
103655103658
/**
103656103659
* Restore the dependency cache
103657103660
* @param id ID of the package manager, should be "maven" or "gradle"
103661+
* @param cacheDependencyPath The path to a dependency file
103658103662
*/
103659-
function restore(id) {
103663+
function restore(id, cacheDependencyPath) {
103660103664
return __awaiter(this, void 0, void 0, function* () {
103661103665
const packageManager = findPackageManager(id);
103662-
const primaryKey = yield computeCacheKey(packageManager);
103666+
const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath);
103663103667
core.debug(`primary key is ${primaryKey}`);
103664103668
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
103665-
if (primaryKey.endsWith('-')) {
103666-
throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
103667-
}
103668103669
// No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
103669103670
const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey);
103670103671
if (matchedKey) {
@@ -103740,7 +103741,7 @@ function isProbablyGradleDaemonProblem(packageManager, error) {
103740103741
"use strict";
103741103742

103742103743
Object.defineProperty(exports, "__esModule", ({ value: true }));
103743-
exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0;
103744+
exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0;
103744103745
exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home';
103745103746
exports.INPUT_JAVA_VERSION = 'java-version';
103746103747
exports.INPUT_JAVA_VERSION_FILE = 'java-version-file';
@@ -103759,6 +103760,7 @@ exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase';
103759103760
exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined;
103760103761
exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE';
103761103762
exports.INPUT_CACHE = 'cache';
103763+
exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path';
103762103764
exports.INPUT_JOB_STATUS = 'job-status';
103763103765
exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint';
103764103766
exports.M2_DIR = '.m2';
@@ -105565,6 +105567,7 @@ function run() {
105565105567
const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE);
105566105568
const jdkFile = core.getInput(constants.INPUT_JDK_FILE);
105567105569
const cache = core.getInput(constants.INPUT_CACHE);
105570+
const cacheDependencyPath = core.getInput(constants.INPUT_CACHE_DEPENDENCY_PATH);
105568105571
const checkLatest = util_1.getBooleanInput(constants.INPUT_CHECK_LATEST, false);
105569105572
let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID);
105570105573
core.startGroup('Installed distributions');
@@ -105600,7 +105603,7 @@ function run() {
105600105603
core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
105601105604
yield auth.configureAuthentication();
105602105605
if (cache && util_1.isCacheFeatureAvailable()) {
105603-
yield cache_1.restore(cache);
105606+
yield cache_1.restore(cache, cacheDependencyPath);
105604105607
}
105605105608
}
105606105609
catch (error) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy