Skip to content

Commit

Permalink
DEVOPS-2561 Fix formatting by keeping empty lines (#265)
Browse files Browse the repository at this point in the history
* DEVOPS-2561 Fix formatting by keeping empty lines

* Fix

* Remove -i flag

* Remove shell

* Debug

* Override diff exit code
  • Loading branch information
artursmolarek authored Jul 10, 2023
1 parent 48309a9 commit e088c6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/update-helm-chart-default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
- name: Set key & value
uses: mikefarah/[email protected]
with:
cmd: yq -i '${{ inputs.key }} = "${{ inputs.value }}"' charts/${{ inputs.chart }}/values.yaml
cmd: yq '${{ inputs.key }} = "${{ inputs.value }}"' charts/${{ inputs.chart }}/values.yaml > charts/${{ inputs.chart }}/values-updated.yaml
- name: Keep empty lines
run: |
diff -U0 -w -b --ignore-blank-lines charts/${{ inputs.chart }}/values.yaml charts/${{ inputs.chart }}/values-updated.yaml > charts/${{ inputs.chart }}/values.yaml.diff || true
patch charts/${{ inputs.chart }}/values.yaml < charts/${{ inputs.chart }}/values.yaml.diff
- name: Commit and push changes
uses: EndBug/[email protected]
with:
Expand Down

0 comments on commit e088c6e

Please sign in to comment.