Skip to content

Commit c7036f8

Browse files
author
Victor Hugo dos Santos
committed
feat: update upload script for Cloudsmith and increment helm chart version to 0.2.2
1 parent bd567c4 commit c7036f8

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,8 @@ jobs:
3939
with:
4040
version: v3.10.0
4141

42-
- name: Install python
43-
uses: actions/setup-python@v4
44-
45-
- name: Install Cloudsmith CLI
46-
run: pip install --upgrade cloudsmith-cli
47-
4842
- name: Build and push helm package to Cloudsmith
4943
run: sh upload-to-cloudsmith.sh
5044
env:
5145
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
46+
CLOUDSMITH_USERNAME: ${{ secrets.CLOUDSMITH_USERNAME }}

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.2.1
18+
version: 0.2.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

upload-to-cloudsmith.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
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 helm
210
helm dependency update
311
helm package .
12+
13+
# Push to OCI repository
14+
echo "$CLOUDSMITH_API_KEY" | helm registry login helm.oci.cloudsmith.io \
15+
--username "$CLOUDSMITH_USERNAME" \
16+
--password-stdin
17+
418
for i in *.tgz; do
5-
[ -f "$i" ] || break
6-
cloudsmith push helm --republish infisical/helm-charts "$i"
19+
[ -f "$i" ] || break
20+
helm push "$i" oci://helm.oci.cloudsmith.io/infisical/helm-charts
721
done
22+
23+
helm registry logout helm.oci.cloudsmith.io

0 commit comments

Comments
 (0)