Skip to content

Commit c29b25a

Browse files
committed
feat(ci): enabled Helm chart publishing
1 parent dca75b7 commit c29b25a

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

.github/workflows/helm.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and publish a Helm chart
2+
on:
3+
push:
4+
branches: ['master']
5+
paths:
6+
- deploy/**
7+
8+
env:
9+
CHARTS_REPOSITORY: ghcr.io/${{ github.repository_owner }}/charts
10+
11+
jobs:
12+
publish-helm-chart:
13+
permissions:
14+
contents: read
15+
packages: write
16+
id-token: write
17+
18+
runs-on: ubuntu:latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v5
23+
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ github.token }}
30+
31+
- name: Package and push Helm chart
32+
run: |
33+
export VERSION=$(yq -r .version ./deploy/charts/managed-postgres-operator/Chart.yaml)
34+
helm package ./deploy/charts/managed-postgres-operator
35+
helm push ./managed-postgres-operator-${VERSION}.tgz oci://${{ env.CHARTS_REPOSITORY }}/

deploy/charts/managed-postgres-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ replicaCount: 1
33
image:
44
repository: ghcr.io/hoppscale/managed-postgres-operator
55
pullPolicy: IfNotPresent
6-
tag: latest
6+
tag: master
77

88
imagePullSecrets: []
99

0 commit comments

Comments
 (0)