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