Replace downloadCacheFile with downloadCacheStorageSDK

This commit is contained in:
Bassem Dghaidi authored and GitHub committed 2024-11-27 04:51:21 -08:00
1 parent a2898cbdd4
commit 82befd3a8f
3 files changed
+59 -50

No files matched your search

+15 -1
View File
@@ -22,10 +22,24 @@ export async function downloadCacheFile(
`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`
)
return blockBlobClient.downloadToFile(
const response = await blockBlobClient.downloadToFile(
archivePath,
0,
undefined,
downloadOptions
)
switch (response._response.status) {
case 200:
core.info(`Cache downloaded from "${signedUploadURL}"`)
break
case 304:
core.info(`Cache not found at "${signedUploadURL}"`)
break
default:
core.info(`Unexpected HTTP response: ${response._response.status}`)
break
}
return response
}