File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,24 +114,22 @@ export async function run(): Promise<void> {
114114 core . debug (
115115 `Only one artifact ID provided. Fetching latest artifact by its name and checking the ID`
116116 )
117- const getArtifactResponse = await artifactClient . getArtifact (
117+ const { artifact : targetArtifact } = await artifactClient . getArtifact (
118118 inputs . name ,
119- { ... options }
119+ options
120120 )
121121
122- if ( ! getArtifactResponse || ! getArtifactResponse . artifact ) {
122+ if ( ! targetArtifact ) {
123123 throw new Error (
124124 `Artifact with ID '${ artifactIds [ 0 ] } ' not found. Please check the ID.`
125125 )
126126 }
127127
128- const artifact = getArtifactResponse . artifact
129-
130128 core . debug (
131- `Found artifact by ID '${ artifact . name } ' (ID: ${ artifact . id } , Size: ${ artifact . size } )`
129+ `Found artifact by ID '${ targetArtifact . name } ' (ID: ${ targetArtifact . id } , Size: ${ targetArtifact . size } )`
132130 )
133131
134- artifacts = [ artifact ]
132+ artifacts = [ targetArtifact ]
135133 } else {
136134 core . info (
137135 `Multiple artifact IDs provided. Fetching all artifacts to filter by ID`
You can’t perform that action at this time.
0 commit comments