Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

upload helm chart to cloudsmith

Maidul Islam9ee5f3d41bbb
diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml
index e3a3e32bc8..b611dde890 100644
--- a/.github/workflows/helm-chart-release.yaml
+++ b/.github/workflows/helm-chart-release.yaml
@@ -1,33 +1,26 @@
-name: Release Charts
+name: Release Helm Charts
on: [workflow_dispatch]
jobs:
release:
- # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
- # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
- permissions:
- contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
- - name: Configure Git
- run: |
- git config user.name "$GITHUB_ACTOR"
- git config user.email "[email protected]"
-
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0
-
- - name: Run chart-releaser
+ - name: Build helm package
+ run: cd helm-charts && helm package ./infisical
uses: helm/[email protected]
- with:
- charts_dir: helm-charts
+ - name: Install python and Cloudsmith CLI
+ uses: actions/setup-python@v4
+ run: pip install --upgrade cloudsmith-cli
+ - name: Push helm package to Cloudsmith
+ run: cd helm-charts && sh upload-to-cloudsmith.sh
env:
- CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
\ No newline at end of file
diff --git a/helm-charts/upload-to-cloudsmith.sh b/helm-charts/upload-to-cloudsmith.sh
new file mode 100644
index 0000000000..218c11149a
--- /dev/null
+++ b/helm-charts/upload-to-cloudsmith.sh
@@ -0,0 +1,10 @@
+## Loop through each helm chart directoy and build each into helm package
+for d in */ ; do
+ helm package $d
+done
+
+## Upload each packaged helm chart
+for i in *.tgz; do
+ [ -f "$i" ] || break
+ cloudsmith push helm --republish infisical/helm-charts $i
+done
\ No newline at end of file