Skip to content

Commit b83057b

Browse files
committed
bundle
1 parent 171183c commit b83057b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

dist/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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`);

0 commit comments

Comments
 (0)