-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (39 loc) · 1.13 KB
/
charts-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: charts release
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'src/charts/**'
jobs:
release:
runs-on: ubuntu-latest
name: Charts Release
steps:
- name: checkout
uses: actions/checkout@v4
- name: helm - package
run: |
for dir in src/charts/*; do
if [ -d "$dir" ]; then
chart_name=$(basename "$dir")
dest_dir="repository/$chart_name"
mkdir -p "$dest_dir"
helm package "$dir" -d "$dest_dir"
echo "Packaged $chart_name to $dest_dir"
fi
done
- name: helm - repo - index
run: |
helm repo index repository --url "repository"
helm repo index --merge repository/index.yaml .
rm repository/index.yaml
- name: github - publish - charts
run: |
git config user.name "Romeo Dumitrescu"
git config user.email "5931333+winromulus@users.noreply.github.com"
git add .
git status
git commit -m "Published charts and updated repository index"
git push