From 77c9534a4f912f538cc4ffded24e1535414d2256 Mon Sep 17 00:00:00 2001 From: Niklas Gehlen Date: Mon, 26 Feb 2024 18:56:46 +0100 Subject: [PATCH] release new version --- actions-toolkit | 2 +- dist/merge/index.js | 8 ++++---- dist/upload/index.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/actions-toolkit b/actions-toolkit index e8a566ae..d4f77a27 160000 --- a/actions-toolkit +++ b/actions-toolkit @@ -1 +1 @@ -Subproject commit e8a566ae5033f503649565cf0dffbcef8daf6709 +Subproject commit d4f77a277cc318677b31b7d7c8c3422dee19289a diff --git a/dist/merge/index.js b/dist/merge/index.js index 80d5ad0d..11dc6fd8 100644 --- a/dist/merge/index.js +++ b/dist/merge/index.js @@ -3403,7 +3403,7 @@ const crypto = __importStar(__nccwpck_require__(6113)); const stream = __importStar(__nccwpck_require__(12781)); const fs = __importStar(__nccwpck_require__(57147)); const errors_1 = __nccwpck_require__(37986); -function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) { +function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { return __awaiter(this, void 0, void 0, function* () { let uploadByteCount = 0; const maxConcurrency = (0, config_1.getConcurrency)(); @@ -3430,8 +3430,8 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) { if (!tempDirectory) { throw new Error('Unable to get the RUNNER_TEMP env variable'); } - // TODO encode the name to always have a valid filename. - const tempFile = tempDirectory + '/' + name + '.zip'; + const dir = fs.mkdtempSync(tempDirectory); + const tempFile = dir + '/data.zip'; yield new Promise(resolve => { const file = fs.createWriteStream(tempFile); uploadStream.pipe(file); @@ -3690,7 +3690,7 @@ function uploadArtifact(name, files, rootDirectory, options) { } const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel); // Upload zip to blob storage - const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(name, createArtifactResp.signedUploadUrl, zipUploadStream); + const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream); // finalize the artifact const finalizeArtifactReq = { workflowRunBackendId: backendIds.workflowRunBackendId, diff --git a/dist/upload/index.js b/dist/upload/index.js index 815630ae..9c32009e 100644 --- a/dist/upload/index.js +++ b/dist/upload/index.js @@ -3403,7 +3403,7 @@ const crypto = __importStar(__nccwpck_require__(6113)); const stream = __importStar(__nccwpck_require__(12781)); const fs = __importStar(__nccwpck_require__(57147)); const errors_1 = __nccwpck_require__(37986); -function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) { +function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { return __awaiter(this, void 0, void 0, function* () { let uploadByteCount = 0; const maxConcurrency = (0, config_1.getConcurrency)(); @@ -3430,8 +3430,8 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) { if (!tempDirectory) { throw new Error('Unable to get the RUNNER_TEMP env variable'); } - // TODO encode the name to always have a valid filename. - const tempFile = tempDirectory + '/' + name + '.zip'; + const dir = fs.mkdtempSync(tempDirectory); + const tempFile = dir + '/data.zip'; yield new Promise(resolve => { const file = fs.createWriteStream(tempFile); uploadStream.pipe(file); @@ -3690,7 +3690,7 @@ function uploadArtifact(name, files, rootDirectory, options) { } const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel); // Upload zip to blob storage - const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(name, createArtifactResp.signedUploadUrl, zipUploadStream); + const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream); // finalize the artifact const finalizeArtifactReq = { workflowRunBackendId: backendIds.workflowRunBackendId,