Skip to content

Commit 33ac358

Browse files
committed
Add GitHub Actions workflow for OCI registry support and update README
1 parent bd388de commit 33ac358

File tree

2 files changed

+140
-11
lines changed

2 files changed

+140
-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: 51 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)
@@ -81,15 +84,6 @@ The complete OpenCloud deployment with all components for production use:
8184
- Document editing with Collabora and/or OnlyOffice
8285
- Full Gateway API integration
8386

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-
9387
[View Production Chart Documentation](./charts/opencloud/README.md)
9488

9589
### Development Chart (`charts/opencloud-dev`)
@@ -100,13 +94,59 @@ A lightweight single-container deployment for development and testing:
10094
- Minimal resource requirements
10195
- Quick setup for testing
10296

97+
[View Development Chart Documentation](./charts/opencloud-dev/README.md)
98+
99+
## 🚀 Installation
100+
101+
You can install the Helm charts either directly from this Git repository or from the OCI registry.
102+
103+
### Installing from Git Repository
104+
103105
```bash
106+
# Clone the repository
107+
git clone https://github.com/opencloud-eu/helm.git
108+
cd helm
109+
110+
# Install Production Chart
111+
helm install opencloud ./charts/opencloud \
112+
--namespace opencloud \
113+
--create-namespace \
114+
--set httpRoute.enabled=true \
115+
--set httpRoute.gateway.name=opencloud-gateway \
116+
--set httpRoute.gateway.namespace=kube-system
117+
118+
# Or install Development Chart
104119
helm install opencloud ./charts/opencloud-dev \
105120
--namespace opencloud \
106121
--create-namespace
107122
```
108123

109-
[View Development Chart Documentation](./charts/opencloud-dev/README.md)
124+
### Installing from OCI Registry
125+
126+
The charts are also available in the GitHub Container Registry (GHCR) as OCI artifacts:
127+
128+
```bash
129+
# Install Production Chart
130+
helm install opencloud oci://ghcr.io/opencloud-eu/helm-charts/opencloud \
131+
--version 0.1.4 \
132+
--namespace opencloud \
133+
--create-namespace \
134+
--set httpRoute.enabled=true \
135+
--set httpRoute.gateway.name=opencloud-gateway \
136+
--set httpRoute.gateway.namespace=kube-system
137+
138+
# Or install Development Chart
139+
helm install opencloud-dev oci://ghcr.io/opencloud-eu/helm-charts/opencloud-dev \
140+
--version 0.1.0 \
141+
--namespace opencloud \
142+
--create-namespace
143+
```
144+
145+
You can list available versions with:
146+
147+
```bash
148+
helm search repo oci://ghcr.io/opencloud-eu/helm-charts --versions
149+
```
110150

111151
## Architecture
112152

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

889929
## Community Maintained
890930

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!
931+
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)