11name : release helm chart
22
3+ # on:
4+ # release:
5+ # types:
6+ # - published
7+
38on :
4- release :
5- types :
6- - published
9+ push :
10+ branches :
11+ - main
712
813env :
914 HELM_VERSION : v3.15.2
@@ -27,35 +32,50 @@ jobs:
2732 version : ${{ env.HELM_VERSION }}
2833 # token: ${{ secrets.GITHUB_TOKEN }}
2934
30- - name : update gh-pages with content from main
31- env :
32- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33- run : |
34- git checkout main
35- git pull origin main
36- git checkout gh-pages
37- git pull origin gh-pages
38- git merge -X theirs main
35+ # - name: update gh-pages with content from main
36+ # env:
37+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+ # run: |
39+ # git checkout main
40+ # git pull origin main
41+ # git checkout gh-pages
42+ # git pull origin gh-pages
43+ # git merge -X theirs main
3944
40- - name : helm release packages
41- env :
42- CR_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45+ - name : add helm repos
4346 run : |
44- # update `values.yaml` with a gitSha
45- chart="helm-chart/eoapi"
46- COMMITSHA=$(git rev-parse HEAD | cut -c1-10)
47- sed -i "s|gitSha: \"[a-zA-Z0-9]+\"|gitSha: \"$COMMITSHA\"|g" "$chart"/values.yaml
48-
49- # package recent chart
50- helm package $chart --destination .
47+ helm repo add eoapi https://devseed.com/eoapi-k8s/
48+ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
49+ helm repo add grafana https://grafana.github.io/helm-charts
50+ helm repo list
5151
52- # create the index file
53- helm repo index .
52+ - name : run chart-releaser
53+ 54+ with :
55+ charts_dir : helm-chart
56+ env :
57+ CR_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
58+ CR_SKIP_EXISTING : true
5459
55- git add -A
56- chart_version=$(cat $chart/Chart.yaml| grep version: | cut -d' ' -f2)
57- git commit -m $chart_version
58- git push origin gh-pages
60+ # - name: helm release packages
61+ # env:
62+ # CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+ # run: |
64+ # # update `values.yaml` with a gitSha
65+ # chart="helm-chart/eoapi"
66+ # COMMITSHA=$(git rev-parse HEAD | cut -c1-10)
67+ # sed -i "s|gitSha: \"[a-zA-Z0-9]+\"|gitSha: \"$COMMITSHA\"|g" "$chart"/values.yaml
68+ #
69+ # # package recent chart
70+ # helm package $chart --destination .
71+ #
72+ # # create the index file
73+ # helm repo index .
74+ #
75+ # git add -A
76+ # chart_version=$(cat $chart/Chart.yaml| grep version: | cut -d' ' -f2)
77+ # git commit -m $chart_version
78+ # git push origin gh-pages
5979
6080
6181
0 commit comments