Skip to content

Commit d4317a6

Browse files
authored
Merge pull request #58 from Infisical/feature/helm-oci-upload
improvement(helm): switch helm chart release to OCI push
2 parents 4caa0f4 + 063eebf commit d4317a6

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/release-k8-operator-helm.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@ jobs:
4949
with:
5050
version: v3.10.0
5151

52-
- name: Install python
53-
uses: actions/setup-python@v4
54-
55-
- name: Install Cloudsmith CLI
56-
run: pip install --upgrade cloudsmith-cli
57-
5852
- name: Build and push helm package to CloudSmith
5953
run: cd helm-charts && sh upload-k8s-operator-cloudsmith.sh
6054
env:
6155
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
56+
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
4+
if [ -z "$CLOUDSMITH_API_KEY" ] || [ -z "$CLOUDSMITH_USERNAME" ]; then
5+
echo "Error: CLOUDSMITH_API_KEY and CLOUDSMITH_USERNAME environment variables must be set."
6+
exit 1
7+
fi
8+
19
cd secrets-operator
210
helm dependency update
311
helm package .
12+
13+
echo "$CLOUDSMITH_API_KEY" | helm registry login helm.oci.cloudsmith.io \
14+
--username "$CLOUDSMITH_USERNAME" \
15+
--password-stdin
16+
417
for i in *.tgz; do
518
[ -f "$i" ] || break
6-
cloudsmith push helm --republish infisical/helm-charts "$i"
19+
helm push "$i" oci://helm.oci.cloudsmith.io/infisical/helm-charts
720
done
8-
cd ..
21+
22+
helm registry logout helm.oci.cloudsmith.io
23+
24+
cd ..

0 commit comments

Comments
 (0)