@@ -19,26 +19,32 @@ jobs:
1919
2020 - name : Update Chart Version
2121 run : |
22- TAG="${{ github.ref_name }}"
23- TAG_VERSION=$(echo $TAG | sed 's/v//')
24- CURRENT_VERSION=$(grep "version:" charts/coralogix-operator/Chart.yaml | awk '{print $2}')
25- NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{$3+=1}1')
22+ TAG="${{ github.ref_name }}"
23+ VERSION="${TAG#v}"
24+
25+ sed -i "s/^appVersion:.*/appVersion: $VERSION/" charts/coralogix-operator/Chart.yaml
26+ sed -i "s/^version:.*/version: $VERSION/" charts/coralogix-operator/Chart.yaml
2627
27- sed -i "s/appVersion:.*/appVersion: $TAG_VERSION/" charts/coralogix-operator/Chart.yaml
28- sed -i "s/version:.*/version: $NEW_VERSION/" charts/coralogix-operator/Chart.yaml
2928
3029 - name : Update Chart version in Documentation
3130 run : make helm-sync-docs
3231
32+ - name : Extract Release Branch from Tag
33+ run : |
34+ TAG="${{ github.ref_name }}"
35+ VERSION="${TAG#v}"
36+ echo "RELEASE_BRANCH=$(echo "$VERSION" | cut -d. -f1,2)" >> $GITHUB_ENV
37+
3338 - name : Create Pull Request
3439 uses : peter-evans/create-pull-request@v3
3540 with :
3641 token : ${{ secrets.GITHUB_TOKEN }}
3742 commit-message : " Bump version and update appVersion in Chart.yaml"
3843 title : " Bump version and update appVersion in Chart.yaml"
39- base : main
44+ base : release-${{ env.RELEASE_BRANCH }}
4045 branch : update-chart-version-${{ github.ref_name }}
4146 add-paths : |
4247 charts/coralogix-operator/Chart.yaml
48+ charts/coralogix-operator/README.md
4349 body : |
4450 This pull request bumps the version and updates the appVersion in Chart.yaml to match the tag.
0 commit comments