File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 7777 const versions = await github.paginate(listFn, listParams);
7878 core.info(`Found ${versions.length} versions`);
7979
80- const hashRegex = /^[0-9a-f]{40 }$/i;
80+ const hashRegex = /^(?:sha256:)? [0-9a-f]{7,64 }$/i;
8181 let deleted = 0;
8282 for (const version of versions) {
8383 const created = new Date(version.created_at).getTime();
8686 }
8787
8888 const tags = version.metadata?.container?.tags ?? [];
89- const hasCommitTag = tags.some(tag => hashRegex.test(tag));
89+ const digest = version.metadata?.container?.digest;
90+ const identifiers = [...tags];
91+ if (digest) {
92+ identifiers.push(digest);
93+ }
94+ if (version.name) {
95+ identifiers.push(version.name);
96+ }
97+
98+ const hasCommitTag = identifiers.some(id => hashRegex.test(id));
9099 if (!hasCommitTag) {
91100 continue;
92101 }
You can’t perform that action at this time.
0 commit comments