mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-29 03:30:57 -05:00
Bump @actions/cache from 2.0.0 to 2.0.1
This commit is contained in:
parent
0e24fa1975
commit
3317bc450c
7 changed files with 30 additions and 35 deletions
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js
vendored
2
dist/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -10,7 +10,7 @@
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "2.0.0",
|
"@actions/cache": "2.0.1",
|
||||||
"@actions/core": "1.6.0",
|
"@actions/core": "1.6.0",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "5.0.1",
|
"@actions/github": "5.0.1",
|
||||||
|
@ -38,9 +38,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache": {
|
"node_modules/@actions/cache": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.1.tgz",
|
||||||
"integrity": "sha512-d7n8ul6HjWX6oDrNEPoqn8ZvqyyDhp9Uek6WOxALyxGVsXU+8+ND+viD3UfrXVWfs/GQiqI5Eq4cOozZj0yRFQ==",
|
"integrity": "sha512-GoxSLZFMLpAeHeE7hXqbOz81j+Mpvgs2o8HL2UlFQppXrrNcIsofFGyoH76htcZZPB/876f6NedFr2AS8Xd2Vw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
|
@ -7092,9 +7092,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": {
|
"@actions/cache": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.1.tgz",
|
||||||
"integrity": "sha512-d7n8ul6HjWX6oDrNEPoqn8ZvqyyDhp9Uek6WOxALyxGVsXU+8+ND+viD3UfrXVWfs/GQiqI5Eq4cOozZj0yRFQ==",
|
"integrity": "sha512-GoxSLZFMLpAeHeE7hXqbOz81j+Mpvgs2o8HL2UlFQppXrrNcIsofFGyoH76htcZZPB/876f6NedFr2AS8Xd2Vw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "2.0.0",
|
"@actions/cache": "2.0.1",
|
||||||
"@actions/core": "1.6.0",
|
"@actions/core": "1.6.0",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "5.0.1",
|
"@actions/github": "5.0.1",
|
||||||
|
|
|
@ -26,24 +26,10 @@ index 16b20f7..aea77ba 100644
|
||||||
+ constructor(key: string, size?: number);
|
+ constructor(key: string, size?: number);
|
||||||
+}
|
+}
|
||||||
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
||||||
index dd31592..cbe378a 100644
|
index 435f74b..7784f47 100644
|
||||||
--- a/node_modules/@actions/cache/lib/cache.js
|
--- a/node_modules/@actions/cache/lib/cache.js
|
||||||
+++ b/node_modules/@actions/cache/lib/cache.js
|
+++ b/node_modules/@actions/cache/lib/cache.js
|
||||||
@@ -37,6 +37,13 @@ class ReserveCacheError extends Error {
|
@@ -93,6 +93,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.ReserveCacheError = ReserveCacheError;
|
|
||||||
+class CacheEntry {
|
|
||||||
+ constructor(key, size) {
|
|
||||||
+ this.key = key;
|
|
||||||
+ this.size = size;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+exports.CacheEntry = CacheEntry;
|
|
||||||
function checkPaths(paths) {
|
|
||||||
if (!paths || paths.length === 0) {
|
|
||||||
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
|
|
||||||
@@ -93,6 +100,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
|
||||||
}
|
}
|
||||||
const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||||
core.debug(`Archive Path: ${archivePath}`);
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
|
@ -51,7 +37,7 @@ index dd31592..cbe378a 100644
|
||||||
try {
|
try {
|
||||||
// Download the cache from the cache entry
|
// Download the cache from the cache entry
|
||||||
yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);
|
yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);
|
||||||
@@ -100,6 +108,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
@@ -100,6 +101,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
||||||
yield tar_1.listTar(archivePath, compressionMethod);
|
yield tar_1.listTar(archivePath, compressionMethod);
|
||||||
}
|
}
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
|
@ -59,7 +45,7 @@ index dd31592..cbe378a 100644
|
||||||
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
yield tar_1.extractTar(archivePath, compressionMethod);
|
yield tar_1.extractTar(archivePath, compressionMethod);
|
||||||
core.info('Cache restored successfully');
|
core.info('Cache restored successfully');
|
||||||
@@ -113,7 +122,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
@@ -113,7 +115,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
|
||||||
core.debug(`Failed to delete archive: ${error}`);
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +54,7 @@ index dd31592..cbe378a 100644
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.restoreCache = restoreCache;
|
exports.restoreCache = restoreCache;
|
||||||
@@ -144,6 +153,7 @@ function saveCache(paths, key, options) {
|
@@ -138,6 +140,7 @@ function saveCache(paths, key, options) {
|
||||||
const archiveFolder = yield utils.createTempDirectory();
|
const archiveFolder = yield utils.createTempDirectory();
|
||||||
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
||||||
core.debug(`Archive Path: ${archivePath}`);
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
|
@ -76,15 +62,15 @@ index dd31592..cbe378a 100644
|
||||||
try {
|
try {
|
||||||
yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod);
|
yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod);
|
||||||
if (core.isDebug()) {
|
if (core.isDebug()) {
|
||||||
@@ -151,6 +161,7 @@ function saveCache(paths, key, options) {
|
@@ -145,6 +148,7 @@ function saveCache(paths, key, options) {
|
||||||
}
|
}
|
||||||
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
+ savedEntry.size = archiveFileSize;
|
+ savedEntry.size = archiveFileSize;
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
if (archiveFileSize > fileSizeLimit) {
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
|
||||||
@@ -167,7 +178,7 @@ function saveCache(paths, key, options) {
|
@@ -176,8 +180,15 @@ function saveCache(paths, key, options) {
|
||||||
core.debug(`Failed to delete archive: ${error}`);
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,3 +79,12 @@ index dd31592..cbe378a 100644
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.saveCache = saveCache;
|
exports.saveCache = saveCache;
|
||||||
|
+class CacheEntry {
|
||||||
|
+ constructor(key, size) {
|
||||||
|
+ this.key = key;
|
||||||
|
+ this.size = size;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+exports.CacheEntry = CacheEntry;
|
||||||
|
//# sourceMappingURL=cache.js.map
|
||||||
|
\ No newline at end of file
|
Loading…
Reference in a new issue