Skip to content

Commit 5e212a0

Browse files
authored
Update delete_artifact.yml
1 parent 327b682 commit 5e212a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/delete_artifact.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
const artifactId = '${{ inputs.artifact_id }}';
2626
const artifactToDelete = response.data.artifacts.find(artifact => artifact.id == artifactId);
2727
28-
console.log(artifactToDelete);
29-
3028
if (artifactToDelete) {
3129
console.log(`Deleting artifact: ID: ${artifactToDelete.id}, Workflow: ${artifactToDelete.workflow_run.head_branch}, SHA: Workflow: ${artifactToDelete.workflow_run.head_sha}, Created: ${artifactToDelete.created_at}, Download: ${artifactToDelete.archive_download_url}`);
3230
@@ -37,6 +35,12 @@ jobs:
3735
});
3836
3937
console.log(`Artifact deleted successfully.`);
38+
39+
console.log('Remaining artifacts:');
40+
response.data.artifacts.filter(artifact => artifact.id != artifactToDelete).forEach(artifact => {
41+
console.log(`ID: ${artifact.id}, Workflow: ${artifact.workflow_run.head_branch}, SHA: Workflow: ${artifact.workflow_run.head_sha}, Created: ${artifact.created_at}, Download: ${artifact.archive_download_url}`);
42+
});
43+
4044
} else {
4145
console.log(`Artifact with ID "${artifactId}" not found.`);
4246

0 commit comments

Comments
 (0)