Skip to content

Commit fbe1f8f

Browse files
authored
Merge pull request opencloud-eu#43 from ferenc-hechler/feature/add-oci-registry-support
Add OCI registry support via GitHub Actions workflow
2 parents bd388de + 26256ac commit fbe1f8f

File tree

2 files changed

+150
-11
lines changed

2 files changed

+150
-11
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Publish Helm charts to OCI Registry
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Publish when a new tag is pushed
8+
tags:
9+
- 'v*'
10+
# Allow manual trigger
11+
workflow_dispatch:
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Set up Helm
26+
uses: azure/setup-helm@v3
27+
with:
28+
version: 'latest'
29+
30+
- name: Login to GitHub Container Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Set up chart-releaser
38+
uses: helm/[email protected]
39+
with:
40+
install_only: true
41+
42+
- name: Set up tags
43+
run: |
44+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
45+
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
46+
# Default version for non-tag builds
47+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
48+
echo "CHARTS_VERSION=0.0.0-${GITHUB_SHA::8}" >> $GITHUB_ENV
49+
elif [[ "${{ github.ref }}" == refs/tags/v* ]]; then
50+
echo "CHARTS_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
51+
else
52+
echo "CHARTS_VERSION=0.0.0-dev" >> $GITHUB_ENV
53+
fi
54+
55+
- name: Package and push OpenCloud chart
56+
run: |
57+
# Update Chart.yaml version if we have a tag
58+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
59+
echo "Updating chart version to ${{ env.CHARTS_VERSION }}"
60+
sed -i "s/^version:.*/version: ${{ env.CHARTS_VERSION }}/" charts/opencloud/Chart.yaml
61+
fi
62+
63+
# Package Helm chart
64+
helm package charts/opencloud
65+
66+
# Push to GHCR
67+
helm push opencloud-*.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts/
68+
69+
# Verify the pushed chart
70+
echo "Verifying the pushed chart..."
71+
helm pull oci://ghcr.io/${{ github.repository_owner }}/helm-charts/opencloud --version $(helm show chart charts/opencloud | grep version | awk '{print $2}')
72+
73+
- name: Package and push OpenCloud Dev chart
74+
run: |
75+
# Update Chart.yaml version if we have a tag
76+
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
77+
echo "Updating chart version to ${{ env.CHARTS_VERSION }}"
78+
sed -i "s/^version:.*/version: ${{ env.CHARTS_VERSION }}/" charts/opencloud-dev/Chart.yaml
79+
fi
80+
81+
# Package Helm chart
82+
helm package charts/opencloud-dev
83+
84+
# Push to GHCR
85+
helm push opencloud-dev-*.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts/
86+
87+
# Verify the pushed chart
88+
echo "Verifying the pushed chart..."
89+
helm pull oci://ghcr.io/${{ github.repository_owner }}/helm-charts/opencloud-dev --version $(helm show chart charts/opencloud-dev | grep version | awk '{print $2}')

README.md

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Welcome to the **OpenCloud Helm Charts** repository! This repository is intended
1313
- [Available Charts](#-available-charts)
1414
- [Production Chart](#production-chart-chartsopencloud)
1515
- [Development Chart](#development-chart-chartsopencloud-dev)
16+
- [Installation](#-installation)
17+
- [Installing from Git Repository](#installing-from-git-repository)
18+
- [Installing from OCI Registry](#installing-from-oci-registry)
1619
- [Architecture](#architecture)
1720
- [Component Interaction Diagram](#component-interaction-diagram)
1821
- [Configuration](#configuration)
@@ -67,6 +70,16 @@ The current maintainers and reviewers are listed in [MAINTAINERS.md](./MAINTAINE
6770
- PV provisioner support in the underlying infrastructure (if persistence is enabled)
6871
- External ingress controller (e.g., Cilium Gateway API) for routing traffic to the services
6972

73+
## ⚠️ Version Stability Notice
74+
75+
**Important**: These Helm charts are currently at version `0.x.x`, which according to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html#spec-item-4) means:
76+
- The charts are still under heavy development
77+
- Breaking changes may occur at any time
78+
- The public API should not be considered stable
79+
- Use with caution in production environments
80+
81+
We recommend pinning to specific chart versions and thoroughly testing updates before applying them.
82+
7083
## 📦 Available Charts
7184

7285
This repository contains the following charts:
@@ -81,15 +94,6 @@ The complete OpenCloud deployment with all components for production use:
8194
- Document editing with Collabora and/or OnlyOffice
8295
- Full Gateway API integration
8396

84-
```bash
85-
helm install opencloud ./charts/opencloud \
86-
--namespace opencloud \
87-
--create-namespace \
88-
--set httpRoute.enabled=true \
89-
--set httpRoute.gateway.name=opencloud-gateway \
90-
--set httpRoute.gateway.namespace=kube-system
91-
```
92-
9397
[View Production Chart Documentation](./charts/opencloud/README.md)
9498

9599
### Development Chart (`charts/opencloud-dev`)
@@ -100,13 +104,59 @@ A lightweight single-container deployment for development and testing:
100104
- Minimal resource requirements
101105
- Quick setup for testing
102106

107+
[View Development Chart Documentation](./charts/opencloud-dev/README.md)
108+
109+
## 🚀 Installation
110+
111+
You can install the Helm charts either directly from this Git repository or from the OCI registry.
112+
113+
### Installing from Git Repository
114+
103115
```bash
116+
# Clone the repository
117+
git clone https://github.com/opencloud-eu/helm.git
118+
cd helm
119+
120+
# Install Production Chart
121+
helm install opencloud ./charts/opencloud \
122+
--namespace opencloud \
123+
--create-namespace \
124+
--set httpRoute.enabled=true \
125+
--set httpRoute.gateway.name=opencloud-gateway \
126+
--set httpRoute.gateway.namespace=kube-system
127+
128+
# Or install Development Chart
104129
helm install opencloud ./charts/opencloud-dev \
105130
--namespace opencloud \
106131
--create-namespace
107132
```
108133

109-
[View Development Chart Documentation](./charts/opencloud-dev/README.md)
134+
### Installing from OCI Registry
135+
136+
The charts are also available in the GitHub Container Registry (GHCR) as OCI artifacts:
137+
138+
```bash
139+
# Install Production Chart
140+
helm install opencloud oci://ghcr.io/opencloud-eu/helm-charts/opencloud \
141+
--version 0.1.4 \
142+
--namespace opencloud \
143+
--create-namespace \
144+
--set httpRoute.enabled=true \
145+
--set httpRoute.gateway.name=opencloud-gateway \
146+
--set httpRoute.gateway.namespace=kube-system
147+
148+
# Or install Development Chart
149+
helm install opencloud-dev oci://ghcr.io/opencloud-eu/helm-charts/opencloud-dev \
150+
--version 0.1.0 \
151+
--namespace opencloud \
152+
--create-namespace
153+
```
154+
155+
You can list available versions with:
156+
157+
```bash
158+
helm search repo oci://ghcr.io/opencloud-eu/helm-charts --versions
159+
```
110160

111161
## Architecture
112162

@@ -888,4 +938,4 @@ This project is licensed under the **AGPLv3** licence. See the [LICENSE](LICENSE
888938

889939
## Community Maintained
890940

891-
This repository is **community-maintained** and **not officially supported by OpenCloud GmbH**. Use at your own risk, and feel free to contribute to improve the project!
941+
This repository is **community-maintained** and **not officially supported by OpenCloud GmbH**. Use at your own risk, and feel free to contribute to improve the project!

0 commit comments

Comments
 (0)