Skip to content

Commit e3ac97a

Browse files
ci: publish Helm Chart as OCI artifact (#130)
1 parent 68b2f21 commit e3ac97a

File tree

2 files changed

+79
-2
lines changed

2 files changed

+79
-2
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ jobs:
9191
9292
npx changelogithub
9393
94-
deploy:
95-
name: 🚀 Build and push
94+
deploy-docker:
95+
name: 🚀 Build and push Docker image
9696
permissions:
9797
packages: write
9898
contents: read
@@ -136,3 +136,36 @@ jobs:
136136
platforms: linux/amd64,linux/arm64
137137
tags: ${{ steps.meta.outputs.tags }}
138138
labels: ${{ steps.meta.outputs.labels }}
139+
140+
deploy-chart:
141+
name: 🚀 Build and push Helm chart
142+
permissions:
143+
packages: write
144+
contents: read
145+
needs: [release]
146+
runs-on: ubuntu-latest
147+
env:
148+
CHART_DIR: install/kubernetes/github-actions-cache-server
149+
steps:
150+
- uses: actions/checkout@v4
151+
with:
152+
ref: master
153+
154+
- name: Login to GitHub Container Registry
155+
uses: docker/login-action@v3
156+
with:
157+
registry: ghcr.io
158+
username: ${{ github.actor }}
159+
password: ${{ secrets.GITHUB_TOKEN }}
160+
161+
- name: Package Helm chart
162+
run: helm package . --destination packaged
163+
working-directory: ${{ env.CHART_DIR }}
164+
165+
- name: Push Helm chart to GHCR
166+
run: |
167+
shopt -s nullglob
168+
for pkg in ${{ env.CHART_DIR }}/packaged/*.tgz; do
169+
echo "Pushing $pkg to ghcr.io/${{ github.repository_owner }}/charts"
170+
helm push "$pkg" "oci://ghcr.io/${{ github.repository_owner }}/charts"
171+
done

docs/content/1.getting-started/1.index.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The cache server is available as a Docker image and can be deployed via Docker C
77

88
## 1. Deploying the Cache Server
99

10+
### Using Docker Compose
11+
1012
```yaml [docker-compose.yml]
1113
services:
1214
cache-server:
@@ -22,6 +24,48 @@ volumes:
2224
cache-data:
2325
```
2426
27+
### Using Kubernetes with Helm
28+
29+
You can deploy the cache server in Kubernetes using the Helm chart hosted in a OCI repository.
30+
31+
#### Prerequisites
32+
33+
- Helm version 3.8.0 or later (required for OCI support).
34+
- A running Kubernetes cluster.
35+
36+
#### Steps
37+
38+
1. Install the Helm chart:
39+
40+
```bash
41+
helm install <release-name> oci://ghcr.io/falcondev-oss/charts/github-actions-cache-server
42+
```
43+
44+
Replace `<release-name>` with your desired release name (e.g., `cache-server`). This will deploy the cache server with all default values.
45+
46+
2. Verify the deployment:
47+
48+
```bash
49+
kubectl get deployments
50+
kubectl get svc
51+
```
52+
53+
Ensure the deployment `<release-name>-github-actions-cache-server` is running and the service is accessible.
54+
55+
#### Customizing the Deployment
56+
57+
To customize the deployment, you can override the default values by creating a `values.yaml` file.
58+
59+
For all possible configuration options, refer to the [values.yaml file](https://github.com/falcondev-oss/github-actions-cache-server/blob/master/install/kubernetes/github-actions-cache-server/values.yaml).
60+
61+
For more details on customizing Helm charts, see the [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing).
62+
63+
Then install the chart with your custom values:
64+
65+
```bash
66+
helm install <release-name> oci://ghcr.io/falcondev-oss/charts/github-actions-cache-server -f values.yaml
67+
```
68+
2569
### Environment Variables
2670

2771
#### `API_BASE_URL`

0 commit comments

Comments
 (0)