Skip to content

Commit b8ea945

Browse files
authored
Merge pull request #44 from libredb/dev
feat(helm): add production-grade Helm chart with ArtifactHub integration
2 parents da92533 + 642915b commit b8ea945

24 files changed

Lines changed: 1587 additions & 9 deletions

.github/workflows/ci.yml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919

2020
- name: Setup Bun
2121
uses: oven-sh/setup-bun@v2
@@ -47,7 +47,7 @@ jobs:
4747

4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v6
5151

5252
- name: Setup Bun
5353
uses: oven-sh/setup-bun@v2
@@ -79,7 +79,7 @@ jobs:
7979

8080
steps:
8181
- name: Checkout code
82-
uses: actions/checkout@v4
82+
uses: actions/checkout@v6
8383

8484
- name: Setup Bun
8585
uses: oven-sh/setup-bun@v2
@@ -109,14 +109,45 @@ jobs:
109109
name: playwright-report
110110
path: playwright-report/
111111

112+
helm-lint:
113+
name: Helm Chart Lint
114+
runs-on: ubuntu-latest
115+
steps:
116+
- name: Checkout code
117+
uses: actions/checkout@v6
118+
119+
- name: Set up Helm
120+
uses: azure/setup-helm@v4
121+
with:
122+
version: v3.16.0
123+
124+
- name: Add Bitnami repo
125+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
126+
127+
- name: Build chart dependencies
128+
run: helm dependency build charts/libredb-studio
129+
130+
- name: Lint Helm chart
131+
run: helm lint charts/libredb-studio --strict
132+
133+
- name: Verify appVersion matches package.json
134+
run: |
135+
APP_VERSION=$(node -e "console.log(require('./package.json').version)")
136+
CHART_VERSION=$(grep '^appVersion:' charts/libredb-studio/Chart.yaml | awk '{print $2}' | tr -d '"')
137+
if [ "$APP_VERSION" != "$CHART_VERSION" ]; then
138+
echo "ERROR: Chart appVersion ($CHART_VERSION) does not match package.json ($APP_VERSION)"
139+
exit 1
140+
fi
141+
echo "OK: appVersion=$CHART_VERSION matches package.json"
142+
112143
sonarcloud:
113144
name: SonarCloud Analysis
114145
needs: [test]
115146
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
116147
runs-on: ubuntu-latest
117148
steps:
118149
- name: Checkout code
119-
uses: actions/checkout@v4
150+
uses: actions/checkout@v6
120151
with:
121152
fetch-depth: 0
122153

.github/workflows/docker-build-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v6
3333

3434
- name: Setup Bun
3535
uses: oven-sh/setup-bun@v2

.github/workflows/helm-release.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Helm Chart Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "charts/**"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
pages: write
14+
15+
jobs:
16+
lint-test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Helm
25+
uses: azure/setup-helm@v4
26+
with:
27+
version: v3.16.0
28+
29+
- name: Add Bitnami repo
30+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
31+
32+
- name: Set up Python (for chart-testing)
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Set up chart-testing
38+
uses: helm/chart-testing-action@v2.8.0
39+
40+
- name: Run chart-testing lint
41+
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --charts charts/libredb-studio
42+
43+
- name: Create Kind cluster
44+
uses: helm/kind-action@v1.14.0
45+
46+
- name: Run chart-testing install
47+
run: |
48+
ct install \
49+
--target-branch ${{ github.event.repository.default_branch }} \
50+
--charts charts/libredb-studio \
51+
--helm-extra-set-args "\
52+
--set secrets.jwtSecret=test-jwt-secret-minimum-32-characters-long \
53+
--set secrets.adminPassword=TestAdmin123 \
54+
--set secrets.userPassword=TestUser123"
55+
56+
release-github-pages:
57+
needs: lint-test
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v6
62+
with:
63+
fetch-depth: 0
64+
65+
- name: Configure Git
66+
run: |
67+
git config user.name "$GITHUB_ACTOR"
68+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
69+
70+
- name: Set up Helm
71+
uses: azure/setup-helm@v4
72+
with:
73+
version: v3.16.0
74+
75+
- name: Add Bitnami repo
76+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
77+
78+
- name: Build chart dependencies
79+
run: helm dependency build charts/libredb-studio
80+
81+
- name: Run chart-releaser
82+
uses: helm/chart-releaser-action@v1.7.0
83+
env:
84+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
85+
86+
release-oci:
87+
needs: lint-test
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v6
92+
93+
- name: Set up Helm
94+
uses: azure/setup-helm@v4
95+
with:
96+
version: v3.16.0
97+
98+
- name: Add Bitnami repo
99+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
100+
101+
- name: Login to GHCR
102+
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
103+
104+
- name: Build dependencies
105+
run: helm dependency build charts/libredb-studio
106+
107+
- name: Package chart
108+
run: helm package charts/libredb-studio -d .cr-release-packages
109+
110+
- name: Push to OCI registry
111+
run: helm push .cr-release-packages/libredb-studio-*.tgz oci://ghcr.io/libredb/charts

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,7 @@ Thumbs.db
8484

8585
!.claude/skills
8686
.orchids/
87-
.codegraph/
87+
.codegraph/
88+
89+
# Helm subchart dependencies (built at CI time via helm dependency build)
90+
charts/*/charts/*.tgz

artifacthub-repo.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
repositoryID: libredb-studio
2+
owners:
3+
- name: cevheri
4+
email: cevheribozoglu@gmail.com

charts/libredb-studio/.helmignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.git
2+
.gitignore
3+
.github
4+
.vscode
5+
.idea
6+
*.swp
7+
*.bak
8+
*.tmp
9+
*.orig
10+
.DS_Store
11+
ci/

charts/libredb-studio/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: postgresql
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 16.7.27
5+
digest: sha256:e8b999a3aaad6328a13d0c666207650897b69c61367c947d363b2acbe0ea1b42
6+
generated: "2026-03-13T22:39:25.224637014+03:00"

charts/libredb-studio/Chart.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
apiVersion: v2
2+
name: libredb-studio
3+
description: Web-based SQL IDE for cloud-native teams supporting PostgreSQL, MySQL, SQLite, Oracle, SQL Server, MongoDB, and Redis
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.8.10"
7+
kubeVersion: ">=1.26.0-0"
8+
home: https://github.com/libredb/libredb-studio
9+
icon: https://raw.githubusercontent.com/libredb/libredb-studio/main/public/logo.svg
10+
sources:
11+
- https://github.com/libredb/libredb-studio
12+
keywords:
13+
- sql
14+
- ide
15+
- database
16+
- postgresql
17+
- mysql
18+
- mongodb
19+
- redis
20+
- sqlite
21+
- oracle
22+
- mssql
23+
- web-ide
24+
maintainers:
25+
- name: cevheri
26+
url: https://github.com/cevheri
27+
annotations:
28+
artifacthub.io/category: database
29+
artifacthub.io/license: MIT
30+
artifacthub.io/prerelease: "true"
31+
artifacthub.io/containsSecurityUpdates: "false"
32+
artifacthub.io/images: |
33+
- name: libredb-studio
34+
image: ghcr.io/libredb/libredb-studio:0.8.10
35+
platforms:
36+
- linux/amd64
37+
artifacthub.io/links: |
38+
- name: Documentation
39+
url: https://github.com/libredb/libredb-studio#readme
40+
- name: Container Image
41+
url: https://github.com/libredb/libredb-studio/pkgs/container/libredb-studio
42+
- name: Source
43+
url: https://github.com/libredb/libredb-studio
44+
artifacthub.io/changes: |
45+
- Initial Helm chart release
46+
dependencies:
47+
- name: postgresql
48+
version: "16.x.x"
49+
repository: https://charts.bitnami.com/bitnami
50+
condition: postgresql.enabled

0 commit comments

Comments
 (0)