mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2025-04-27 15:20:33 +05:30
fix(ci): Improve annotations handling in renovate release notes script
This commit is contained in:
parent
c1e94ff244
commit
d17699b12d
11
.github/scripts/renovate-releasenotes.py
vendored
11
.github/scripts/renovate-releasenotes.py
vendored
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
|
import io
|
||||||
import typer
|
import typer
|
||||||
|
|
||||||
from git import Repo
|
from git import Repo
|
||||||
@ -189,9 +190,11 @@ def main(
|
|||||||
})
|
})
|
||||||
|
|
||||||
if annotations:
|
if annotations:
|
||||||
# Instead of trying to dump the list of annotations directly, we'll treat it as a string
|
annotations_stream = io.StringIO()
|
||||||
annotations_list = [yaml.dump(item).rstrip() for item in annotations]
|
yaml.dump(annotations, annotations_stream)
|
||||||
annotations_string = "\n".join(annotations_list)
|
|
||||||
|
annotations_string = annotations_stream.getvalue()
|
||||||
|
annotations_stream.close()
|
||||||
|
|
||||||
if "annotations" not in new_chart_metadata:
|
if "annotations" not in new_chart_metadata:
|
||||||
new_chart_metadata["annotations"] = CommentedMap()
|
new_chart_metadata["annotations"] = CommentedMap()
|
||||||
@ -200,7 +203,7 @@ def main(
|
|||||||
|
|
||||||
new_chart_metadata = bump_patch_version(new_chart_metadata)
|
new_chart_metadata = bump_patch_version(new_chart_metadata)
|
||||||
|
|
||||||
with chart_metadata_file.open('w') as f:
|
with chart_metadata_file.open("w") as f:
|
||||||
yaml.dump(new_chart_metadata, f)
|
yaml.dump(new_chart_metadata, f)
|
||||||
|
|
||||||
|
|
||||||
|
1
.github/workflows/pr-validate.yaml
vendored
1
.github/workflows/pr-validate.yaml
vendored
@ -24,6 +24,7 @@ jobs:
|
|||||||
uses: ./.github/workflows/charts-lint.yaml
|
uses: ./.github/workflows/charts-lint.yaml
|
||||||
needs:
|
needs:
|
||||||
- pr-metadata
|
- pr-metadata
|
||||||
|
- charts-changelog
|
||||||
with:
|
with:
|
||||||
checkoutCommit: ${{ github.sha }}
|
checkoutCommit: ${{ github.sha }}
|
||||||
chartsToLint: ${{ needs.pr-metadata.outputs.chartsToLint }}
|
chartsToLint: ${{ needs.pr-metadata.outputs.chartsToLint }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user