File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118848,13 +118848,12 @@ function run() {
118848118848 // if the length of artifactIds exactly 1 fetch the latest artifact by its name and check the ID
118849118849 if (artifactIds.length === 1) {
118850118850 core.debug(`Only one artifact ID provided. Fetching latest artifact by its name and checking the ID`);
118851- const getArtifactResponse = yield artifact_1.default.getArtifact(inputs.name, Object.assign({}, options) );
118852- if (!getArtifactResponse || !getArtifactResponse.artifact ) {
118851+ const { artifact: targetArtifact } = yield artifact_1.default.getArtifact(inputs.name, options);
118852+ if (!targetArtifact ) {
118853118853 throw new Error(`Artifact with ID '${artifactIds[0]}' not found. Please check the ID.`);
118854118854 }
118855- const artifact = getArtifactResponse.artifact;
118856- core.debug(`Found artifact by ID '${artifact.name}' (ID: ${artifact.id}, Size: ${artifact.size})`);
118857- artifacts = [artifact];
118855+ core.debug(`Found artifact by ID '${targetArtifact.name}' (ID: ${targetArtifact.id}, Size: ${targetArtifact.size})`);
118856+ artifacts = [targetArtifact];
118858118857 }
118859118858 else {
118860118859 core.info(`Multiple artifact IDs provided. Fetching all artifacts to filter by ID`);
You can’t perform that action at this time.
0 commit comments