Skip to content

Commit

Permalink
fix(ci): prevent spaces from being removed when helm chart is updated (
Browse files Browse the repository at this point in the history
…#2078)

- `yq` command removes the extra spaces before an end line comment
so this will cause `helm lint` failure
- by this change, the deleted spaces will be ignored and it will be kept
only the new value of `.image.tag`

Signed-off-by: Andreea-Lupu <[email protected]>
  • Loading branch information
Andreea-Lupu authored Nov 24, 2023
1 parent 6222dae commit 02a8ed7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,13 @@ jobs:
- name: Update image tag
uses: mikefarah/yq@master
with:
cmd: yq -i '.image.tag = "${{ github.event.release.tag_name }}"' 'helm-charts/charts/zot/values.yaml'
cmd: |
yq e '.image.tag = "${{ github.event.release.tag_name }}"' 'helm-charts/charts/zot/values.yaml' > values-updated.yaml
- name: Patch values.yaml file
run: |
diff -b 'helm-charts/charts/zot/values.yaml' values-updated.yaml > values.diff || true
patch 'helm-charts/charts/zot/values.yaml' < values.diff
rm values-updated.yaml values.diff
- name: Update version
run: |
sudo apt-get install pip
Expand Down

0 comments on commit 02a8ed7

Please sign in to comment.