Skip uploading empty caches
This commit is contained in:
Родитель
5b057af8ce
Коммит
f3714aed1f
|
@ -125,6 +125,11 @@ async function uploadDependencyCaches(config, logger) {
|
|||
continue;
|
||||
}
|
||||
const size = await (0, caching_utils_1.getTotalCacheSize)(cacheConfig.paths, logger);
|
||||
// Skip uploading an empty cache.
|
||||
if (size === 0) {
|
||||
logger.info(`Skipping upload of dependency cache for ${language} since it is empty.`);
|
||||
continue;
|
||||
}
|
||||
const key = await cacheKey(language, cacheConfig);
|
||||
logger.info(`Uploading cache of size ${size} for ${language} with key ${key}`);
|
||||
await actionsCache.saveCache(cacheConfig.paths, key);
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"dependency-caching.js","sourceRoot":"","sources":["../src/dependency-caching.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,4DAiDC;AAQD,wDA+BC;AApKD,uCAAyB;AACzB,+BAA4B;AAE5B,6DAA+C;AAC/C,oDAAsC;AAEtC,mDAAoD;AAIpD,iCAA6C;AAgB7C,MAAM,8BAA8B,GAAG,qBAAqB,CAAC;AAC7D,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAE1C;;GAEG;AACH,MAAM,2BAA2B,GAAwC;IACvE,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,QAAQ;YACR,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC;YACvC,SAAS;YACT,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;SACxC;QACD,IAAI,EAAE;YACJ,QAAQ;YACR,YAAY;YACZ,SAAS;YACT,cAAc;YACd,8BAA8B;YAC9B,yBAAyB;YACzB,6BAA6B;YAC7B,wBAAwB;YACxB,wBAAwB;SACzB;KACF;IACD,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE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,CAAC,CAAC;QAEhE,iCAAiC;QACjC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CACT,2CAA2C,QAAQ,qBAAqB,CACzE,CAAC;YACF,SAAS;QACX,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAElD,MAAM,CAAC,IAAI,CACT,2BAA2B,IAAI,QAAQ,QAAQ,aAAa,GAAG,EAAE,CAClE,CAAC;QAEF,MAAM,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACvD,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,QAAQ,CACrB,QAAkB,EAClB,WAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,OAAO,GAAG,MAAM,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,WAAW,CAAC,QAAkB;IAC3C,MAAM,QAAQ,GAAG,IAAA,0BAAmB,EAAC,WAAW,CAAC,CAAC;IAClD,OAAO,GAAG,8BAA8B,IAAI,+BAA+B,IAAI,QAAQ,IAAI,QAAQ,GAAG,CAAC;AACzG,CAAC"}
|
|
@ -154,6 +154,15 @@ export async function uploadDependencyCaches(config: Config, logger: Logger) {
|
|||
}
|
||||
|
||||
const size = await getTotalCacheSize(cacheConfig.paths, logger);
|
||||
|
||||
// Skip uploading an empty cache.
|
||||
if (size === 0) {
|
||||
logger.info(
|
||||
`Skipping upload of dependency cache for ${language} since it is empty.`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
const key = await cacheKey(language, cacheConfig);
|
||||
|
||||
logger.info(
|
||||
|
|
Загрузка…
Ссылка в новой задаче