Update proto artifact interface, retrieve artifact digests, return indicator of mismatch failure

This commit is contained in:
Ryan Ghadimi
2025-03-05 11:29:44 +00:00
parent ec9716b3cc
commit d5c8a0fa27
7 changed files with 433 additions and 49 deletions

View File

@@ -91,6 +91,11 @@ export interface DownloadArtifactResponse {
* The path where the artifact was downloaded to
*/
downloadPath?: string
/**
* Returns true if the digest of the downloaded artifact does not match the expected hash
*/
digestMismatch?: boolean
}
/**
@@ -101,6 +106,19 @@ export interface DownloadArtifactOptions {
* Denotes where the artifact will be downloaded to. If not specified then the artifact is download to GITHUB_WORKSPACE
*/
path?: string
/**
* The hash that was computed for the artifact during upload. Don't provide this unless you want to verify the hash.
* If the hash doesn't match, the download will fail.
*/
expectedHash?: string
}
export interface StreamExtractResponse {
/**
* The SHA256 hash of the downloaded file
*/
sha256Digest?: string
}
/**
@@ -126,6 +144,11 @@ export interface Artifact {
* The time when the artifact was created
*/
createdAt?: Date
/**
* The digest of the artifact, computed at time of upload.
*/
digest?: string
}
// FindOptions are for fetching Artifact(s) out of the scope of the current run.