99 IMAGE_NAME : clickhouse/clickhouse-operator
1010 IMAGE_TAG_BASE : ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator
1111 VERSION : ${{ github.ref_name }}
12+ # Tempora ry address while repo is private
13+ PAGES_URL : https://solid-adventure-16rp7jv.pages.github.io/
1214
1315jobs :
1416 release :
3133 registry : ${{ env.REGISTRY }}
3234 username : ${{ github.actor }}
3335 password : ${{ secrets.GITHUB_TOKEN }}
36+ - name : Install Helm
37+ run : curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
38+ - name : Verify Helm installation
39+ run : helm version
40+
3441 - name : Set VERSION
3542 run : echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
43+
3644 - name : Build operator image
3745 run : make docker-buildx
3846 - name : Build operator bundle image
@@ -45,19 +53,12 @@ jobs:
4553 kustomize_version : 5.7.1
4654 kustomize_build_dir : " config/default"
4755 kustomize_output_file : " dist/clickhouse-operator.yaml"
48- - name : Run chart-releaser
49- uses : helm/chart-releaser-action@v1.7.0
50- env :
51- CR_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
52- with :
53- charts_dir : dist/chart
54- packages_with_index : true
55- mark_as_latest : true
56- pages_branch : helm-releases
56+ - name : Package helm chart
57+ run : helm package --version ${VERSION} --app-version v${VERSION} -d dist/chart
58+
5759 - name : Create GitHub Release
5860 uses : softprops/action-gh-release@v1
5961 with :
60- draft : true
6162 tag_name : ${{ github.ref_name }}
6263 name : ${{github.ref_name }}
6364 body : |
7273 ```
7374 generate_release_notes : true
7475 append_body : true
75- files : dist/clickhouse-operator.yaml
76+ files : |
77+ dist/clickhouse-operator.yaml
78+ dist/chart/clickhouse-operator-${VERSION}.tgz
79+ - name : Checkout helm-releases branch
80+ run : |
81+ git config user.name "github-actions[bot]"
82+ git config user.email "github-actions[bot]@users.noreply.github.com"
83+ git fetch origin helm-releases
84+ git checkout helm-releases
85+ helm repo index --url "${PAGES_URL}/dist/chart" dist/chart
86+ git add dist/chart/index.yaml
87+ git add dist/chart/clickhouse-operator-${VERSION}.tgz
88+ git commit -m "Add chart $GITHUB_REF_NAME"
89+ git push origin helm-releases
0 commit comments