File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,23 +30,26 @@ jobs:
3030 sed -i "s/^version: .*/version: ${PREVIEW_VERSION}/" chart/Chart.yaml
3131 echo "PREVIEW_VERSION=${PREVIEW_VERSION}" >> $GITHUB_ENV
3232
33+ - name : Set registry owner
34+ run : echo "REGISTRY_OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
35+
3336 - name : Login to GHCR
3437 run : echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
3538
3639 - name : Package and push
3740 run : |
3841 helm package ./chart
39- helm push theia-shared-cache-${PREVIEW_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
42+ helm push theia-shared-cache-${PREVIEW_VERSION}.tgz oci://ghcr.io/${{ env.REGISTRY_OWNER }}/charts
4043
4144 - name : Comment install instructions
4245 uses : marocchino/sticky-pull-request-comment@v2
4346 with :
4447 header : chart-preview
4548 message : |
46- ## 📦 Chart Preview Ready
49+ ## Chart Preview Ready
4750
4851 ```bash
49- helm install test oci://ghcr.io/${{ github.repository_owner }}/charts/theia-shared-cache --version ${{ env.PREVIEW_VERSION }}
52+ helm install test oci://ghcr.io/${{ env.REGISTRY_OWNER }}/charts/theia-shared-cache --version ${{ env.PREVIEW_VERSION }}
5053 ```
5154
5255 _Updated: ${{ github.sha }}_
Original file line number Diff line number Diff line change @@ -12,27 +12,40 @@ jobs:
1212 release :
1313 permissions :
1414 contents : write
15+ packages : write
1516 runs-on : ubuntu-latest
1617 steps :
1718 - name : Checkout
1819 uses : actions/checkout@v4
1920 with :
2021 fetch-depth : 0
2122
22- - name : Configure Git
23- run : |
24- git config user.name "$GITHUB_ACTOR"
25- git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
26-
2723 - name : Install Helm
2824 uses : azure/setup-helm@v4
2925
3026 - name : Update chart dependencies
3127 run : helm dependency update ./chart
3228
33- - name : Run chart-releaser
34- uses : helm/chart-releaser-action@v1.6.0
35- env :
36- CR_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
29+ - name : Set registry owner
30+ run : echo "REGISTRY_OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
31+
32+ - name : Login to GHCR
33+ run : echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
34+
35+ - name : Extract chart version
36+ id : chart
37+ run : |
38+ VERSION=$(grep '^version:' chart/Chart.yaml | awk '{print $2}')
39+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
40+
41+ - name : Package and push to OCI
42+ run : |
43+ helm package ./chart
44+ helm push theia-shared-cache-${{ steps.chart.outputs.version }}.tgz oci://ghcr.io/${{ env.REGISTRY_OWNER }}/charts
45+
46+ - name : Create GitHub Release
47+ uses : softprops/action-gh-release@v2
3748 with :
38- charts_dir : " ."
49+ tag_name : theia-shared-cache-${{ steps.chart.outputs.version }}
50+ name : theia-shared-cache ${{ steps.chart.outputs.version }}
51+ generate_release_notes : true
You can’t perform that action at this time.
0 commit comments