From b83057b90d3e218abf5c7b1906579eb6c598ae85 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Thu, 17 Apr 2025 12:20:46 -0700 Subject: [PATCH] bundle --- dist/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3a8adea..61783a4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -118848,13 +118848,12 @@ function run() { // if the length of artifactIds exactly 1 fetch the latest artifact by its name and check the ID if (artifactIds.length === 1) { core.debug(`Only one artifact ID provided. Fetching latest artifact by its name and checking the ID`); - const getArtifactResponse = yield artifact_1.default.getArtifact(inputs.name, Object.assign({}, options)); - if (!getArtifactResponse || !getArtifactResponse.artifact) { + const { artifact: targetArtifact } = yield artifact_1.default.getArtifact(inputs.name, options); + if (!targetArtifact) { throw new Error(`Artifact with ID '${artifactIds[0]}' not found. Please check the ID.`); } - const artifact = getArtifactResponse.artifact; - core.debug(`Found artifact by ID '${artifact.name}' (ID: ${artifact.id}, Size: ${artifact.size})`); - artifacts = [artifact]; + core.debug(`Found artifact by ID '${targetArtifact.name}' (ID: ${targetArtifact.id}, Size: ${targetArtifact.size})`); + artifacts = [targetArtifact]; } else { core.info(`Multiple artifact IDs provided. Fetching all artifacts to filter by ID`);