Skip to content

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

refactor: update helm release workflow and improve upload script

Victor Hugo dos Santosd48440d3822c
diff --git a/.github/workflows/helm-release-infisical-core.yml b/.github/workflows/helm-release-infisical-core.yml
index 49118a5aed..7f9622e988 100644
--- a/.github/workflows/helm-release-infisical-core.yml
+++ b/.github/workflows/helm-release-infisical-core.yml
@@ -69,11 +69,8 @@ jobs:
uses: azure/setup-helm@v3
with:
version: v3.10.0
- - name: Install python
- uses: actions/setup-python@v4
- - name: Install Cloudsmith CLI
- run: pip install --upgrade cloudsmith-cli
- name: Build and push helm package to Cloudsmith
run: cd helm-charts && sh upload-infisical-core-helm-cloudsmith.sh
env:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
+ CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
diff --git a/helm-charts/upload-infisical-core-helm-cloudsmith.sh b/helm-charts/upload-infisical-core-helm-cloudsmith.sh
index 304850bee9..e176c49ac8 100755
--- a/helm-charts/upload-infisical-core-helm-cloudsmith.sh
+++ b/helm-charts/upload-infisical-core-helm-cloudsmith.sh
@@ -1,8 +1,24 @@
+#!/usr/bin/env sh
+set -e
+
cd "infisical-standalone-postgres"
helm dependency update
helm package .
+
+if [ -z "$CLOUDSMITH_API_KEY" ] || [ -z "$CLOUDSMITH_USERNAME" ]; then
+ echo "Error: CLOUDSMITH_API_KEY and CLOUDSMITH_USERNAME environment variables must be set."
+ exit 1
+fi
+
+echo "$CLOUDSMITH_API_KEY" | helm registry login helm.oci.cloudsmith.io \
+ --username "$CLOUDSMITH_USERNAME" \
+ --password-stdin
+
for i in *.tgz; do
[ -f "$i" ] || break
- cloudsmith push helm --republish infisical/helm-charts "$i"
+ helm push "$i" oci://helm.oci.cloudsmith.io/infisical/helm-charts
done
+
+helm registry logout helm.oci.cloudsmith.io
+
cd ..