actions-cache-s3
要対応
Save (Upload)
code:save.ts
await cache.saveCache(cachePaths, primaryKey, {
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
});
const cacheId = await cacheHttpClient.reserveCache(key, paths, {
cacheIdから resource url を生成してる
await cacheHttpClient.saveCache(cacheId, archivePath, options)
await uploadFile(httpClient, cacheId, archivePath, options)
これはまるっと差し換え
##[debug]Resource Url: https://artifactcache.actions.githubusercontent.com/ykxeiZ1cjH5fYnADVCqaFyAHDcKV9Iml4VhWBM3akgIw6afSGl/_apis/artifactcache/cache?keys=macOS-&version=e154b6bfe35625e0c918633dc35a401d67d4d234a38ac657cdc0826d204aed43
やる
createHttpClient()
uploadChunk()
commitCache()
Restore (Download)
code:restore.ts
const cacheKey = await cache.restoreCache(
cachePaths,
primaryKey,
restoreKeys
);
if (!cacheKey) {
core.info(
`Cache not found for input keys: ${[
primaryKey,
...restoreKeys
].join(", ")}`
);
return;
}
await cacheHttpClient.downloadCache(
await downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions)
const result = await client.downloadToBuffer(