Skip to content

Commit

Permalink
ci: Add diff pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Jul 21, 2024
1 parent 8cd4338 commit 11160d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
changed=$(ct list-changed --config charts/ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "changed_list=\"${changed//$'\n'/ }\"" >> "$GITHUB_OUTPUT"
echo "changed_list=\"${changed//$'\n'/ }\"" | tee -a "$GITHUB_OUTPUT"
fi
- name: install helm diff plugin
Expand All @@ -68,10 +68,14 @@ jobs:
- name: Run chart-testing (diff)
if: steps.list-changed.outputs.changed == 'true'
run: |
changed_list=$(echo $changed_list)
for chart in $changed_list; do
helm install $chart oci://ghcr.io/${{ github.repository_owner }}/charts/$chart --create-namespace --namespace $chart --wait
helm diff upgrade $chart charts/$chart \
echo "installing chart: $chart"
chart="${chart#*/}"
helm install --create-namespace --namespace "${chart}" --wait \
"${chart}" "oci://ghcr.io/${{ github.repository_owner }}/charts/$chart"
helm diff upgrade "${chart}" "charts/${chart}" \
--namespace $chart \
--suppress=CustomResourceDefinition \
--normalize-manifests \
Expand Down
2 changes: 1 addition & 1 deletion charts/github-actions-runner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- "service"
env:
{{- range $key, $val := .Values.env }}
{{- if ne (eq $val "") }}
{{- if not (eq $val "") }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
Expand Down

0 comments on commit 11160d1

Please sign in to comment.