Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g committed Feb 26, 2024
1 parent 1502675 commit 5c98705
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actions-toolkit
3 changes: 2 additions & 1 deletion dist/merge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,7 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
file.on('finish', resolve);
});
const stat = fs.statSync(tempFile);
uploadByteCount = stat.size;
const httpClient = new http_client_1.HttpClient('actions/artifact');
const res = yield httpClient.sendStream('PUT', authenticatedUploadURL, fs.createReadStream(tempFile), {
"Content-Length": stat.size
Expand All @@ -3461,7 +3462,7 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
hashStream.end();
sha256Hash = hashStream.read();
core.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`);
if (uploadByteCount === 0 && !(0, config_1.directZipUpload)()) {
if (uploadByteCount === 0) {
core.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`);
}
return {
Expand Down
3 changes: 2 additions & 1 deletion dist/upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,7 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
file.on('finish', resolve);
});
const stat = fs.statSync(tempFile);
uploadByteCount = stat.size;
const httpClient = new http_client_1.HttpClient('actions/artifact');
const res = yield httpClient.sendStream('PUT', authenticatedUploadURL, fs.createReadStream(tempFile), {
"Content-Length": stat.size
Expand All @@ -3461,7 +3462,7 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
hashStream.end();
sha256Hash = hashStream.read();
core.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`);
if (uploadByteCount === 0 && !(0, config_1.directZipUpload)()) {
if (uploadByteCount === 0) {
core.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`);
}
return {
Expand Down

0 comments on commit 5c98705

Please sign in to comment.