Make caching more verbose

- Print cache size when saving cache similarly to restoring
- Print restore success similarly to saving
- Print cached file list if debug logging is enabled

See also: https://github.com/actions/cache/issues/471
This commit is contained in:
Yaroslav Dynnikov
2020-11-26 01:56:57 +03:00
parent c861dd8859
commit bfdba95ece
4 changed files with 112 additions and 1 deletions
+4
View File
@@ -301,6 +301,10 @@ export async function saveCache(
// Commit Cache
core.debug('Commiting cache')
const cacheSize = utils.getArchiveFileSizeIsBytes(archivePath)
core.info(
`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`
)
const commitCacheResponse = await commitCache(httpClient, cacheId, cacheSize)
if (!isSuccessStatusCode(commitCacheResponse.statusCode)) {
throw new Error(