Skip to content

Commit b758928

Browse files
authored
feat: Add digest field to Artifact (#3621)
1 parent bf1d280 commit b758928

3 files changed

Lines changed: 34 additions & 11 deletions

File tree

github/actions_artifacts.go

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ type ArtifactWorkflowRun struct {
2929
//
3030
// GitHub API docs: https://docs.github.com/rest/actions/artifacts
3131
type Artifact struct {
32-
ID *int64 `json:"id,omitempty"`
33-
NodeID *string `json:"node_id,omitempty"`
34-
Name *string `json:"name,omitempty"`
35-
SizeInBytes *int64 `json:"size_in_bytes,omitempty"`
36-
URL *string `json:"url,omitempty"`
37-
ArchiveDownloadURL *string `json:"archive_download_url,omitempty"`
38-
Expired *bool `json:"expired,omitempty"`
39-
CreatedAt *Timestamp `json:"created_at,omitempty"`
40-
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
41-
ExpiresAt *Timestamp `json:"expires_at,omitempty"`
42-
WorkflowRun *ArtifactWorkflowRun `json:"workflow_run,omitempty"`
32+
ID *int64 `json:"id,omitempty"`
33+
NodeID *string `json:"node_id,omitempty"`
34+
Name *string `json:"name,omitempty"`
35+
SizeInBytes *int64 `json:"size_in_bytes,omitempty"`
36+
URL *string `json:"url,omitempty"`
37+
ArchiveDownloadURL *string `json:"archive_download_url,omitempty"`
38+
Expired *bool `json:"expired,omitempty"`
39+
CreatedAt *Timestamp `json:"created_at,omitempty"`
40+
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
41+
ExpiresAt *Timestamp `json:"expires_at,omitempty"`
42+
// Digest is the SHA256 digest of the artifact.
43+
// This field will only be populated on artifacts uploaded with upload-artifact v4 or newer.
44+
// For older versions, this field will be null.
45+
Digest *string `json:"digest,omitempty"`
46+
WorkflowRun *ArtifactWorkflowRun `json:"workflow_run,omitempty"`
4347
}
4448

4549
// ArtifactList represents a list of GitHub artifacts.

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)