@@ -82,15 +82,50 @@ jobs:
8282 env :
8383 RELEASE_TAG : v${{ needs.check_if_version_upgraded.outputs.to_version }}
8484 steps :
85+ - name : Checkout repository
86+ uses : actions/checkout@v4
87+ - name : Install Helm
88+ uses : azure/setup-helm@v4
89+ - name : Package Helm chart
90+ run : |
91+ helm package helm-charts/catalogi
8592 - name : " Generate release on github"
8693 uses : softprops/action-gh-release@v2
8794 with :
8895 name : Release ${{ env.RELEASE_TAG }}
8996 prerelease : false
9097 tag_name : ${{ env.RELEASE_TAG }}
9198 generate_release_notes : true
99+ files : catalogi-*.tgz
92100 token : ${{ secrets.GITHUB_TOKEN }}
93101
102+ publish_helm_index :
103+ name : Publish Helm chart index
104+ runs-on : ubuntu-latest
105+ needs :
106+ - check_if_version_upgraded
107+ - create_github_release
108+ if : needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
109+ env :
110+ TO_VERSION : ${{ needs.check_if_version_upgraded.outputs.to_version }}
111+ steps :
112+ - name : Checkout repository
113+ uses : actions/checkout@v4
114+ - name : Install Helm
115+ uses : azure/setup-helm@v4
116+ - name : Create charts directory
117+ run : mkdir -p docs/charts
118+ - name : Generate Helm repository index
119+ run : |
120+ helm repo index docs/charts/ --url https://github.com/codegouvfr/catalogi/releases/download/v${TO_VERSION}/
121+ - name : Commit and push index.yaml
122+ run : |
123+ git config --local user.email "[email protected] " 124+ git config --local user.name "GitHub Actions"
125+ git add docs/charts/index.yaml
126+ git commit -m "chore: update Helm chart index for v${TO_VERSION}"
127+ git push
128+
94129 docker :
95130 name : Build and push Docker images
96131 runs-on : ubuntu-latest
0 commit comments