Skip to content

Commit

Permalink
feat(actions): on delete untagged ignore package not found
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-linch committed Feb 23, 2023
1 parent 518fd9e commit 6f3f1b0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ async function deleteUntaggedOrderGreaterThan(config, octokit) {
core.startGroup(`🗑 delete ${pkgs.length} packages`);

for (const pkg of pkgs) {
await utils.deletePackageVersion(
octokit,
config.owner,
config.name,
pkg.id
);
try {
await utils.deletePackageVersion(
octokit,
config.owner,
config.name,
pkg.id
);
} catch (error) {
core.info(`⚠️ package #${pkg.id} not deleted: ${error.message}`);
continue;
}


core.info(`✅ package #${pkg.id} deleted.`);
}
Expand Down

0 comments on commit 6f3f1b0

Please sign in to comment.