File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,11 +2,6 @@ name: Cleanup GHCR package demos/demos
22
33on :
44 workflow_dispatch :
5- inputs :
6- dry_run :
7- description : " If true, only prints what would be deleted"
8- required : true
9- default : " true"
105
116permissions :
127 contents : read
2217 script : |
2318 const owner = context.repo.owner;
2419 const package_name = 'demos/demos';
25- const dryRun = (core.getInput('dry_run') || 'true').toLowerCase() === 'true';
2620
2721 const ownerInfo = await github.rest.users.getByUsername({ username: owner });
2822 const isOrg = ownerInfo.data.type === 'Organization';
5145 core.info(`FOUND id=${v.id} tags=[${tags}]`);
5246 }
5347
54- if (dryRun) {
55- core.warning('Dry run enabled — nothing deleted.');
56- return;
57- }
58-
5948 const deleteFn = isOrg
6049 ? github.rest.packages.deletePackageVersionForOrg
6150 : github.rest.packages.deletePackageVersionForUser;
You can’t perform that action at this time.
0 commit comments