We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04350f8 commit e5b3733Copy full SHA for e5b3733
1 file changed
.github/workflows/ghcr-prune.yml
@@ -77,6 +77,7 @@ jobs:
77
core.info(`Found ${versions.length} versions`);
78
79
const hashRegex = /^(?:sha256:)?[0-9a-f]{7,64}$/i;
80
+ const prRegex = /^pr-\d+$/i;
81
let deleted = 0;
82
for (const version of versions) {
83
const created = new Date(version.created_at).getTime();
@@ -94,8 +95,14 @@ jobs:
94
95
identifiers.push(version.name);
96
}
97
98
+ const hasReleaseTag = tags.some(tag => tag.startsWith('v'));
99
+ if (hasReleaseTag) {
100
+ continue;
101
+ }
102
+
103
const hasCommitTag = identifiers.some(id => hashRegex.test(id));
- if (!hasCommitTag) {
104
+ const hasPrTag = tags.some(tag => prRegex.test(tag));
105
+ if (!hasCommitTag && !hasPrTag) {
106
continue;
107
108
0 commit comments