Store and restore dependency caches in init Action

This commit is contained in:
Michael B. Gale 2024-07-22 15:30:56 +01:00
parent 2b7af49a3d
commit f64038fc40
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
6 changed files with 29 additions and 2 deletions

View file

@ -33,6 +33,7 @@ const actions_util_1 = require("./actions-util");
const api_client_1 = require("./api-client");
const config_utils_1 = require("./config-utils");
const debugArtifacts = __importStar(require("./debug-artifacts"));
const dependency_caching_1 = require("./dependency-caching");
const feature_flags_1 = require("./feature-flags");
const initActionPostHelper = __importStar(require("./init-action-post-helper"));
const logging_1 = require("./logging");
@ -78,6 +79,11 @@ async function runWrapper() {
};
await (0, status_report_1.sendStatusReport)(statusReport);
}
// Store dependency cache(s) if the job was successful and dependency caching is enabled.
if (jobStatus === status_report_1.JobStatus.SuccessStatus &&
config.dependencyCachingEnabled) {
await (0, dependency_caching_1.uploadDependencyCaches)(config, logger);
}
}
void runWrapper();
//# sourceMappingURL=init-action-post.js.map