File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9090 cache-to : type=gha,mode=max
9191
9292 release-chart :
93- needs : [release, build-and-push]
93+ needs : release
94+ if : needs.release.outputs.new_release_published == 'true'
95+ runs-on : ubuntu-latest
96+ permissions :
97+ contents : write
98+
99+ steps :
100+ - name : Checkout
101+ uses : actions/checkout@v4
102+
103+ - name : Configure Git
104+ run : |
105+ git config user.name "$GITHUB_ACTOR"
106+ git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
107+
108+ - name : Install Helm
109+ uses : azure/setup-helm@v3
110+ with :
111+ version : v3.12.1
112+
113+ - name : Package Helm chart
114+ run : |
115+ mkdir -p .cr-release-packages
116+ helm package charts/github-deploy-key-operator --version ${{ needs.release.outputs.new_release_version }} --destination .cr-release-packages
117+
118+ - name : Upload Helm chart
119+ uses : actions/upload-artifact@v3
120+ with :
121+ name : helm-chart
122+ path : .cr-release-packages/*.tgz
123+
124+ - name : Download previous charts
125+ run : |
126+ git checkout gh-pages || git checkout --orphan gh-pages
127+ git rm -rf . || true
128+ git clean -fxd
129+ mkdir -p charts
130+
131+ - name : Download chart artifact
132+ uses : actions/download-artifact@v3
133+ with :
134+ name : helm-chart
135+ path : charts
136+
137+ - name : Generate Helm repo index
138+ run : |
139+ helm repo index charts/
140+ cp charts/index.yaml index.yaml
141+
142+ - name : Push to gh-pages
143+ run : |
144+ git add charts/
145+ git add index.yaml
146+ git commit -m "chore: publish helm chart ${{ needs.release.outputs.new_release_version }}"
147+ git push origin gh-pages -f
148+
149+ publish-chart :
150+ needs : release-chart
94151 if : needs.release.outputs.new_release_published == 'true'
95152 runs-on : ubuntu-latest
96153 permissions :
You can’t perform that action at this time.
0 commit comments