-
Notifications
You must be signed in to change notification settings - Fork 26
92 lines (81 loc) · 2.49 KB
/
release.yaml
File metadata and controls
92 lines (81 loc) · 2.49 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Release charts
on:
push:
branches:
- main
paths:
- "charts/*/Chart.yaml"
workflow_dispatch:
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Setup Helm
uses: azure/setup-helm@v4
with:
version: v3.14.4
- name: Build Chart Dependencies
run: |
echo "Building dependencies for all charts..."
for chart_dir in charts/*/; do
if [ -f "${chart_dir}Chart.yaml" ]; then
chart_name=$(basename "$chart_dir")
echo ""
echo "Processing chart: $chart_name"
cd "${chart_dir}"
if grep -q "dependencies:" Chart.yaml; then
echo " Dependencies found, building..."
helm dependency build
echo " Dependencies built successfully"
if [ -d "charts" ]; then
echo " Downloaded dependencies:"
ls -la charts/
fi
else
echo " No dependencies to build"
fi
cd - > /dev/null
fi
done
echo ""
echo "All chart dependencies built"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
env:
CR_SKIP_EXISTING: true
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: charts
- name: Success Summary
if: success()
run: |
echo "Chart release completed successfully"
echo ""
echo "The following actions were completed:"
echo " - Chart dependencies built"
echo " - Charts packaged"
echo " - GitHub releases created"
echo " - Helm repository index updated"
echo ""
- name: Failure Summary
if: failure()
run: |
echo "Chart release failed"
echo ""
echo "Common issues:"
echo " - Dependency build failures"
echo " - Invalid chart structure"
echo " - GitHub token permissions"
echo " - Duplicate release version"
echo ""
echo "Check the logs above for specific error details"