mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-12-27 04:55:55 +00:00
Move hashsum after tar creation
This commit is contained in:
parent
1c77f64ab3
commit
64668e22dd
2 changed files with 2 additions and 2 deletions
2
dist/save/index.js
vendored
2
dist/save/index.js
vendored
|
@ -2980,7 +2980,6 @@ function run() {
|
||||||
core.debug(`Cache Path: ${cachePath}`);
|
core.debug(`Cache Path: ${cachePath}`);
|
||||||
const archivePath = path.join(yield utils.createTempDirectory(), "cache.tgz");
|
const archivePath = path.join(yield utils.createTempDirectory(), "cache.tgz");
|
||||||
core.debug(`Archive Path: ${archivePath}`);
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
yield exec_1.exec(`md5sum`, [archivePath]);
|
|
||||||
// http://man7.org/linux/man-pages/man1/tar.1.html
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
|
@ -3005,6 +3004,7 @@ function run() {
|
||||||
utils.logWarning(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024 * 1024))} GB (${archiveFileSize} B) is over the 2GB limit, not saving cache.`);
|
utils.logWarning(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024 * 1024))} GB (${archiveFileSize} B) is over the 2GB limit, not saving cache.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
yield exec_1.exec(`md5sum`, [archivePath]);
|
||||||
core.debug("Saving Cache");
|
core.debug("Saving Cache");
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath);
|
yield cacheHttpClient.saveCache(cacheId, archivePath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ async function run(): Promise<void> {
|
||||||
"cache.tgz"
|
"cache.tgz"
|
||||||
);
|
);
|
||||||
core.debug(`Archive Path: ${archivePath}`);
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
await exec(`md5sum`, [archivePath]);
|
|
||||||
|
|
||||||
// http://man7.org/linux/man-pages/man1/tar.1.html
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
|
@ -85,6 +84,7 @@ async function run(): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await exec(`md5sum`, [archivePath]);
|
||||||
core.debug("Saving Cache");
|
core.debug("Saving Cache");
|
||||||
await cacheHttpClient.saveCache(cacheId, archivePath);
|
await cacheHttpClient.saveCache(cacheId, archivePath);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue