11name : Create release images and GitHub Release
22on :
3+ pull_request :
4+ branches :
5+ - main
36 push :
47 tags :
58 - v*.*.*
912 IMAGE_NAME : clickhouse/clickhouse-operator
1013 IMAGE_TAG_BASE : ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator
1114 VERSION : ${{ github.ref_name }}
12- # Tempora ry address while repo is private
13- PAGES_URL : https://solid-adventure-16rp7jv.pages.github.io/
1415
1516jobs :
1617 release :
@@ -23,67 +24,69 @@ jobs:
2324 steps :
2425 - name : Checkout code
2526 uses : actions/checkout@v4
26- - name : Set up Go
27- uses : actions/setup-go@v5
28- with :
29- go-version-file : ' go.mod'
30- - name : Log in to the Container registry
31- uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
32- with :
33- registry : ${{ env.REGISTRY }}
34- username : ${{ github.actor }}
35- password : ${{ secrets.GITHUB_TOKEN }}
27+ # - name: Set up Go
28+ # uses: actions/setup-go@v5
29+ # with:
30+ # go-version-file: 'go.mod'
31+ # - name: Log in to the Container registry
32+ # uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
33+ # with:
34+ # registry: ${{ env.REGISTRY }}
35+ # username: ${{ github.actor }}
36+ # password: ${{ secrets.GITHUB_TOKEN }}
3637 - name : Install Helm
3738 run : curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
3839 - name : Verify Helm installation
3940 run : helm version
4041
4142 - name : Set VERSION
42- run : echo "VERSION=${GITHUB_REF_NAME#v} " >> $GITHUB_ENV
43+ run : echo "VERSION=0.0.1 " >> $GITHUB_ENV
4344
44- - name : Build operator image
45- run : make docker-buildx
46- - name : Build operator bundle image
47- run : make bundle bundle-buildx
45+ # - name: Build operator image
46+ # run: make docker-buildx
47+ # - name: Build operator bundle image
48+ # run: make bundle bundle-buildx
4849
49- - name : Kustomize Build
50- uses : karancode/kustomize-github-action@master
51- with :
52- token : ${{ github.token }}
53- kustomize_version : 5.7.1
54- kustomize_build_dir : " config/default"
55- kustomize_output_file : " dist/clickhouse-operator.yaml"
50+ # - name: Kustomize Build
51+ # uses: karancode/kustomize-github-action@master
52+ # with:
53+ # token: ${{ github.token }}
54+ # kustomize_version: 5.7.1
55+ # kustomize_build_dir: "config/default"
56+ # kustomize_output_file: "dist/clickhouse-operator.yaml"
5657 - name : Package helm chart
5758 run : helm package --version ${VERSION} --app-version v${VERSION} dist/chart
5859
59- - name : Create GitHub Release
60- uses : softprops/action-gh-release@v1
61- with :
62- tag_name : ${{ github.ref_name }}
63- name : ${{github.ref_name }}
64- body : |
65- Pull latest operator images:
66- ```
67- docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator:${{ github.ref_name }}
68- docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator-bundle:${{ github.ref_name }}
69- ```
70- To deploy this release use
71- ```
72- kubectl apply -f https://github.com/ClickHouse/clickhouse-operator/releases/download/${{github.ref_name}}/clickhouse-operator.yaml
73- ```
74- generate_release_notes : true
75- append_body : true
76- files : |
77- dist/clickhouse-operator.yaml
78- dist/chart/clickhouse-operator-${VERSION}.tgz
79- - name : Checkout helm-releases branch
60+ # - name: Create GitHub Release
61+ # uses: softprops/action-gh-release@v1
62+ # with:
63+ # tag_name: ${{ github.ref_name }}
64+ # name: ${{github.ref_name }}
65+ # body: |
66+ # Pull latest operator images:
67+ # ```
68+ # docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator:${{ github.ref_name }}
69+ # docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator-bundle:${{ github.ref_name }}
70+ # ```
71+ # To deploy this release use
72+ # ```
73+ # kubectl apply -f https://github.com/ClickHouse/clickhouse-operator/releases/download/${{github.ref_name}}/clickhouse-operator.yaml
74+ # ```
75+ # generate_release_notes: true
76+ # append_body: true
77+ # files: |
78+ # dist/clickhouse-operator.yaml
79+ # dist/chart/clickhouse-operator-${VERSION}.tgz
80+ - name : Push chart and updated index
8081 run : |
8182 git config user.name "github-actions[bot]"
8283 git config user.email "github-actions[bot]@users.noreply.github.com"
84+ git reset --hard
8385 git fetch origin helm-releases
84- git checkout -f 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"
86+ git checkout helm-releases
87+ find dist/chart
88+ helm repo index .
89+ git add index.yaml
90+ git add clickhouse-operator-${VERSION}.tgz
91+ git commit -m "Add chart $VERSION"
8992 git push origin helm-releases
0 commit comments