Skip to content

Commit 564b5a3

Browse files
Copilotneilime
andcommitted
Revert cleanup script changes per review feedback
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
1 parent 7ef6cdd commit 564b5a3

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

.github/workflows/__test-action-docker-prune-pull-requests-image-tags.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,19 +225,10 @@ jobs:
225225
github-token: ${{ secrets.GITHUB_TOKEN }}
226226
script: |
227227
const packages = process.env.PACKAGES.split("\n").map(packageName => packageName.trim()).filter(Boolean);
228-
await Promise.all(packages.map(async (packageName) => {
229-
try {
230-
return await github.rest.packages.deletePackageForOrg({
231-
package_type: 'container',
232-
package_name: packageName,
233-
org: process.env.GITHUB_REPOSITORY_OWNER,
234-
});
235-
} catch (error) {
236-
// Ignore 404 errors (package not found)
237-
if (error.status === 404) {
238-
console.log(`Package "${packageName}" not found, skipping deletion`);
239-
return;
240-
}
241-
throw error;
242-
}
228+
await Promise.all(packages.map(packageName => {
229+
return github.rest.packages.deletePackageForOrg({
230+
package_type: 'container',
231+
package_name: packageName,
232+
org: process.env.GITHUB_REPOSITORY_OWNER,
233+
});
243234
}));

0 commit comments

Comments
 (0)