mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-15 22:51:31 +00:00
fix: prevent partial pushes causing partial changelogs (#1880)
This commit is contained in:
parent
767d8c1492
commit
c57f6cd8c3
27
.github/workflows/changelog.py
vendored
27
.github/workflows/changelog.py
vendored
@ -131,17 +131,24 @@ def get_manifests(target: str):
|
||||
def get_tags(target: str, manifests: dict[str, Any]):
|
||||
tags = set()
|
||||
|
||||
# Select random manifest to get reference tags from
|
||||
first = next(iter(manifests.values()))
|
||||
for tag in first["RepoTags"]:
|
||||
# Tags ending with .0 should not exist
|
||||
if tag.endswith(".0"):
|
||||
continue
|
||||
if target != "stable":
|
||||
if re.match(OTHER_START_PATTERN(target), tag):
|
||||
tags.add(tag)
|
||||
else:
|
||||
if re.match(STABLE_START_PATTERN, tag):
|
||||
tags.add(tag)
|
||||
|
||||
# Remove tags not present in all images
|
||||
for manifest in manifests.values():
|
||||
for tag in manifest["RepoTags"]:
|
||||
# Tags ending with .0 should not exist
|
||||
if tag.endswith(".0"):
|
||||
continue
|
||||
if target != "stable":
|
||||
if re.match(OTHER_START_PATTERN(target), tag):
|
||||
tags.add(tag)
|
||||
else:
|
||||
if re.match(STABLE_START_PATTERN, tag):
|
||||
tags.add(tag)
|
||||
for tag in list(tags):
|
||||
if tag not in manifest["RepoTags"]:
|
||||
tags.remove(tag)
|
||||
|
||||
tags = list(sorted(tags))
|
||||
assert len(tags) > 2, "No current and previous tags found"
|
||||
|
Loading…
Reference in New Issue
Block a user