Skip to content

Commit 9ef1cc4

Browse files
committed
feat: add GitHub Actions workflow for releasing Helm charts to OCI
1 parent f41b100 commit 9ef1cc4

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Charts
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
permissions:
12+
contents: write
13+
packages: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Configure Git
22+
run: |
23+
git config user.name "$GITHUB_ACTOR"
24+
git config user.email "[email protected]"
25+
26+
- name: Run chart-releaser
27+
uses: helm/[email protected]
28+
with:
29+
charts_dir: helm/charts
30+
env:
31+
CR_GENERATE_RELEASE_NOTES: true
32+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
33+
34+
- name: Run chart-releaser for umbrella charts
35+
uses: helm/[email protected]
36+
with:
37+
charts_dir: helm/umbrella/blueprints
38+
env:
39+
CR_GENERATE_RELEASE_NOTES: true
40+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
41+
42+
- name: Upload to OCI-based registry
43+
run: |
44+
if [ -d ".cr-release-packages" ]; then
45+
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
46+
find .cr-release-packages/ -name *.tgz -exec helm push {} oci://ghcr.io/openmcp-project \;
47+
fi

0 commit comments

Comments
 (0)