mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-01-03 15:22:55 +08:00
Fix upload mechanics
This commit is contained in:
parent
66d5434f23
commit
dccc3f7f1c
@ -1,6 +1,6 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {GetCacheBlobUploadURLResponse} from '../../../generated/results/api/v1/blobcache'
|
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(
|
export async function UploadCache(
|
||||||
uploadURL: GetCacheBlobUploadURLResponse,
|
uploadURL: GetCacheBlobUploadURLResponse,
|
||||||
@ -16,7 +16,9 @@ export async function UploadCache(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Create blob client from container client
|
// 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);
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user