|
79 | 79 | echo "ℹ️ No new release published" |
80 | 80 | fi |
81 | 81 |
|
82 | | - - name: update-helm-values |
83 | | - if: steps.semantic-release.outputs.new-release-published == 'true' |
84 | | - run: | |
85 | | - echo "🔍 Debug: new-release-published = ${{ steps.semantic-release.outputs.new-release-published }}" |
86 | | - echo "🔍 Debug: new-release-version = ${{ steps.semantic-release.outputs.new-release-version }}" |
87 | | -
|
88 | | - NEW_VERSION="${{ steps.semantic-release.outputs.new-release-version }}" |
89 | | - VALUES_FILE="infrastructure/rag/values.yaml" |
90 | | -
|
91 | | - # Update Helm values using Python script |
92 | | - pip install ruamel.yaml |
93 | | - python3 tools/update-helm-values.py "$NEW_VERSION" |
94 | | -
|
95 | | - # Show git diff for verification |
96 | | - if ! git diff --quiet "$VALUES_FILE"; then |
97 | | - echo "Changes made to values.yaml:" |
98 | | - git diff "$VALUES_FILE" |
99 | | - else |
100 | | - echo "⚠️ No changes detected in values.yaml" |
101 | | - fi |
102 | | -
|
103 | | - - name: commit-helm-changes |
104 | | - if: steps.semantic-release.outputs.new-release-published == 'true' |
105 | | - run: | |
106 | | - # Check if there are changes to commit |
107 | | - if ! git diff --quiet infrastructure/rag/values.yaml; then |
108 | | - echo "📝 Committing Helm values changes..." |
109 | | - git config --local user.email "action@github.com" |
110 | | - git config --local user.name "GitHub Action" |
111 | | - git add infrastructure/rag/values.yaml |
112 | | -
|
113 | | - # Create a new commit for the Helm changes (don't amend since semantic-release already pushed) |
114 | | - git commit -m "chore: update helm chart image tags to v${{ steps.semantic-release.outputs.new-release-version }}" |
115 | | - git push |
116 | | -
|
117 | | - echo "✅ Helm chart changes committed and pushed" |
118 | | - else |
119 | | - echo "ℹ️ No Helm chart changes to commit" |
120 | | - fi |
121 | | -
|
122 | 82 | build-and-push-images: |
123 | 83 | name: build-and-push-images |
124 | 84 | runs-on: ubuntu-latest |
@@ -194,4 +154,3 @@ jobs: |
194 | 154 | echo "- frontend" >> $GITHUB_STEP_SUMMARY |
195 | 155 | echo "- admin-frontend" >> $GITHUB_STEP_SUMMARY |
196 | 156 | echo "**Registry:** ghcr.io/${{ github.repository_owner }}/rag-template" >> $GITHUB_STEP_SUMMARY |
197 | | - echo "**Helm chart updated:** infrastructure/rag/values.yaml" >> $GITHUB_STEP_SUMMARY |
0 commit comments