Deploy version 1.0.2
This commit is contained in:
18
dist/index.js
vendored
18
dist/index.js
vendored
@@ -26198,8 +26198,9 @@ function formatSize(bytes) {
|
|||||||
}
|
}
|
||||||
return `${bytes.toFixed(2)} ${units[i2]}`;
|
return `${bytes.toFixed(2)} ${units[i2]}`;
|
||||||
}
|
}
|
||||||
function formatSpeed(bytes, seconds) {
|
function formatSpeed(bytes, ms) {
|
||||||
if (seconds <= 0) return "\u221E";
|
if (ms <= 0) return "\u221E";
|
||||||
|
const seconds = ms / 1e3;
|
||||||
const speedBytesPerSec = bytes / seconds;
|
const speedBytesPerSec = bytes / seconds;
|
||||||
const units = ["B/s", "KiB/s", "MiB/s", "GiB/s"];
|
const units = ["B/s", "KiB/s", "MiB/s", "GiB/s"];
|
||||||
let i2 = 0;
|
let i2 = 0;
|
||||||
@@ -26277,7 +26278,6 @@ async function downloadCache(options, owner, repo, key, destinationPath) {
|
|||||||
const endTime = Date.now();
|
const endTime = Date.now();
|
||||||
const duration = endTime - startTime;
|
const duration = endTime - startTime;
|
||||||
const size = fs2.statSync(destinationPath).size;
|
const size = fs2.statSync(destinationPath).size;
|
||||||
const speedMBs = size / 1024 / 1024 / duration;
|
|
||||||
console.log(`\u2705 Download completed`);
|
console.log(`\u2705 Download completed`);
|
||||||
console.log(`\u{1F4E6} Size: ${formatSize(size)}`);
|
console.log(`\u{1F4E6} Size: ${formatSize(size)}`);
|
||||||
console.log(`\u23F1 Duration: ${formatDuration(duration)}`);
|
console.log(`\u23F1 Duration: ${formatDuration(duration)}`);
|
||||||
@@ -26329,7 +26329,7 @@ async function extractCompressedTar(archivePath, extractTo = "/") {
|
|||||||
shell: "/bin/bash"
|
shell: "/bin/bash"
|
||||||
});
|
});
|
||||||
const endTime = Date.now();
|
const endTime = Date.now();
|
||||||
const duration = (endTime - startTime) / 1e3;
|
const duration = endTime - startTime;
|
||||||
const size = fs3.statSync(archivePath).size;
|
const size = fs3.statSync(archivePath).size;
|
||||||
const speedMBs = size / 1024 / 1024 / duration;
|
const speedMBs = size / 1024 / 1024 / duration;
|
||||||
console.log(`\u2705 Extraction completed`);
|
console.log(`\u2705 Extraction completed`);
|
||||||
@@ -26353,9 +26353,9 @@ async function saveCache(key, paths, cmprss_lvl = 3) {
|
|||||||
archivePath
|
archivePath
|
||||||
);
|
);
|
||||||
const endTime = Date.now();
|
const endTime = Date.now();
|
||||||
const durationSeconds = ((endTime - startTime) / 1e3).toFixed(2);
|
const duration = endTime - startTime;
|
||||||
core.info(
|
core.info(
|
||||||
`\u2705 Cache saved successfully (${formatSize(archiveSize)}, ${durationSeconds} s)
|
`\u2705 Cache saved successfully (${formatSize(archiveSize)}, ${formatDuration(duration)})
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -26382,9 +26382,11 @@ async function restoreCache(key) {
|
|||||||
const archiveSize = fs5.statSync(zstPath).size;
|
const archiveSize = fs5.statSync(zstPath).size;
|
||||||
await extractCompressedTar(zstPath);
|
await extractCompressedTar(zstPath);
|
||||||
const endTime = Date.now();
|
const endTime = Date.now();
|
||||||
const durationSeconds = ((endTime - startTime) / 1e3).toFixed(2);
|
const durationSeconds = (endTime - startTime) / 1e3;
|
||||||
core2.info(
|
core2.info(
|
||||||
`\u2705 Cache restored successfully (${formatSize(archiveSize)}, ${durationSeconds} s)`
|
`
|
||||||
|
\u2705 Cache restored successfully (${formatSize(archiveSize)}, ${formatDuration(durationSeconds)})
|
||||||
|
`
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user