diff --git a/packages/cache/src/internal/v2/upload/upload-cache.ts b/packages/cache/src/internal/v2/upload/upload-cache.ts index d709671f..54616fb2 100644 --- a/packages/cache/src/internal/v2/upload/upload-cache.ts +++ b/packages/cache/src/internal/v2/upload/upload-cache.ts @@ -1,6 +1,6 @@ import * as core from '@actions/core' import {GetCacheBlobUploadURLResponse} from '../../../generated/results/api/v1/blobcache' -import {BlobClient, BlockBlobParallelUploadOptions} from '@azure/storage-blob' +import {BlobClient, BlockBlobClient, BlockBlobParallelUploadOptions} from '@azure/storage-blob' export async function UploadCache( uploadURL: GetCacheBlobUploadURLResponse, @@ -16,7 +16,9 @@ export async function UploadCache( }; // Create blob client from container client - const blobClient: BlobClient = new BlobClient(uploadURL.urls[0]) + // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0]) + const blobClient: BlobClient = new BlobClient(uploadURL.urls[0].url) + const blockBlobClient: BlockBlobClient = blobClient.getBlockBlobClient() - return blobClient.uploadFile(archivePath, uploadOptions); + return blockBlobClient.uploadFile(archivePath, uploadOptions); } \ No newline at end of file