mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2025-04-26 23:00:31 +05:30
fix(ci): Improve handling of annotations string in YAML dump
This commit is contained in:
parent
fab5a463de
commit
b975736f5a
8
.github/scripts/renovate-releasenotes.py
vendored
8
.github/scripts/renovate-releasenotes.py
vendored
@ -9,7 +9,7 @@ from pathlib import Path
|
||||
|
||||
from ruamel.yaml import YAML
|
||||
from ruamel.yaml.comments import CommentedMap
|
||||
from ruamel.yaml.scalarstring import LiteralScalarString
|
||||
from ruamel.yaml.scalarstring import LiteralScalarString, PreservedScalarString
|
||||
from typing import List
|
||||
|
||||
app = typer.Typer(add_completion=False)
|
||||
@ -191,15 +191,15 @@ def main(
|
||||
|
||||
if annotations:
|
||||
annotations_stream = io.StringIO()
|
||||
yaml.dump(annotations, annotations_stream)
|
||||
yaml.dump_all([annotations], annotations_stream)
|
||||
|
||||
annotations_string = annotations_stream.getvalue()
|
||||
annotations_string = annotations_stream.getvalue().strip()
|
||||
annotations_stream.close()
|
||||
|
||||
if "annotations" not in new_chart_metadata:
|
||||
new_chart_metadata["annotations"] = CommentedMap()
|
||||
|
||||
new_chart_metadata["annotations"]["artifacthub.io/changes"] = LiteralScalarString(annotations_string.strip())
|
||||
new_chart_metadata["annotations"]["artifacthub.io/changes"] = LiteralScalarString(annotations_string)
|
||||
|
||||
logger.debug(f"Annotations: {annotations_string}")
|
||||
logger.debug(new_chart_metadata)
|
||||
|
Loading…
x
Reference in New Issue
Block a user