Skip to content

Commit 99e24c4

Browse files
committed
fix(helm): Avoid forbidden chars in annotation
Signed-off-by: kiblik <[email protected]>
1 parent 10b2c39 commit 99e24c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/test-helm-chart.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ jobs:
114114
- name: Update values in HELM chart
115115
if: startsWith(github.head_ref, 'renovate/') || startsWith(github.head_ref, 'dependabot/')
116116
run: |
117-
yq -i '.annotations."artifacthub.io/changes" += "- kind: changed\n description: ${{ github.event.pull_request.title }}\n"' helm/defectdojo/Chart.yaml
117+
title=${{ github.event.pull_request.title }}
118+
chars='{}:[],&*#?|-<>=!%@'
119+
for c in $(echo "$chars" | grep -o .); do
120+
title="${title//"$c"/_}"
121+
done
122+
yq -i '.annotations."artifacthub.io/changes" += "- kind: changed\n description: $title\n"' helm/defectdojo/Chart.yaml
118123
git add helm/defectdojo/Chart.yaml
119124
git commit -m "ci: update Chart annotations from PR #${{ github.event.pull_request.number }}" || echo "No changes to commit"
120125

0 commit comments

Comments
 (0)