mirror of
https://code.forgejo.org/actions/download-artifact.git
synced 2024-12-23 04:06:00 +01:00
Merge pull request #232 from robherley/v4-beta
[v4-beta] Bump linked artifact toolkit pkg
This commit is contained in:
commit
896d1bb258
1 changed files with 9 additions and 9 deletions
18
dist/index.js
vendored
18
dist/index.js
vendored
|
@ -6994,7 +6994,7 @@ var ArtifactServiceMethod;
|
|||
(function (ArtifactServiceMethod) {
|
||||
ArtifactServiceMethod["CreateArtifact"] = "CreateArtifact";
|
||||
ArtifactServiceMethod["FinalizeArtifact"] = "FinalizeArtifact";
|
||||
})(ArtifactServiceMethod = exports.ArtifactServiceMethod || (exports.ArtifactServiceMethod = {}));
|
||||
})(ArtifactServiceMethod || (exports.ArtifactServiceMethod = ArtifactServiceMethod = {}));
|
||||
exports.ArtifactServiceMethodList = [
|
||||
ArtifactServiceMethod.CreateArtifact,
|
||||
ArtifactServiceMethod.FinalizeArtifact
|
||||
|
@ -8009,9 +8009,9 @@ function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) {
|
|||
blobHTTPHeaders: { blobContentType: 'zip' },
|
||||
onProgress: uploadCallback
|
||||
};
|
||||
let md5Hash = undefined;
|
||||
let sha256Hash = undefined;
|
||||
const uploadStream = new stream.PassThrough();
|
||||
const hashStream = crypto.createHash('md5');
|
||||
const hashStream = crypto.createHash('sha256');
|
||||
zipUploadStream.pipe(uploadStream); // This stream is used for the upload
|
||||
zipUploadStream.pipe(hashStream).setEncoding('hex'); // This stream is used to compute a hash of the zip content that gets used. Integrity check
|
||||
try {
|
||||
|
@ -8019,8 +8019,8 @@ function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) {
|
|||
yield blockBlobClient.uploadStream(uploadStream, bufferSize, maxBuffers, options);
|
||||
core.info('Finished uploading artifact content to blob storage!');
|
||||
hashStream.end();
|
||||
md5Hash = hashStream.read();
|
||||
core.info(`MD5 hash of uploaded artifact zip is ${md5Hash}`);
|
||||
sha256Hash = hashStream.read();
|
||||
core.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`);
|
||||
}
|
||||
catch (error) {
|
||||
core.warning(`Failed to upload artifact zip to blob storage, error: ${error}`);
|
||||
|
@ -8037,7 +8037,7 @@ function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) {
|
|||
return {
|
||||
isSuccess: true,
|
||||
uploadSize: uploadByteCount,
|
||||
md5Hash
|
||||
sha256Hash
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -8286,9 +8286,9 @@ function uploadArtifact(name, files, rootDirectory, options) {
|
|||
name,
|
||||
size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : '0'
|
||||
};
|
||||
if (uploadResult.md5Hash) {
|
||||
if (uploadResult.sha256Hash) {
|
||||
finalizeArtifactReq.hash = generated_1.StringValue.create({
|
||||
value: `md5:${uploadResult.md5Hash}`
|
||||
value: `sha256:${uploadResult.sha256Hash}`
|
||||
});
|
||||
}
|
||||
core.info(`Finalizing artifact upload`);
|
||||
|
@ -118999,7 +118999,7 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
|
|||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.0.0","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","@types/unzipper":"^0.10.6","archiver":"^5.3.1","crypto":"^1.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzipper":"^0.10.14"},"devDependencies":{"@types/archiver":"^5.3.2","typescript":"^4.3.0"}}');
|
||||
module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.0.0","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","@types/unzipper":"^0.10.6","archiver":"^5.3.1","crypto":"^1.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzipper":"^0.10.14"},"devDependencies":{"@types/archiver":"^5.3.2","typescript":"^5.2.2"}}');
|
||||
|
||||
/***/ })
|
||||
|
||||
|
|
Loading…
Reference in a new issue