-
Notifications
You must be signed in to change notification settings - Fork 96
54 lines (51 loc) · 1.52 KB
/
chart_release.yaml
File metadata and controls
54 lines (51 loc) · 1.52 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
name: Chart Publish
on:
push:
branches:
- main
paths:
- 'charts/**'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'src'
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v3
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v3
- name: Validate Helm Charts
shell: bash
run: |
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
for d in charts/*/ ; do
echo "$d"
helm lint --quiet "$d"
done
- name: Package Helm Charts
shell: bash
run: |
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
for d in src/charts/*/ ; do
echo "$d"
helm package "$d" -u -d dest
done
- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/labbs/github-actions-exporter/gh-pages/
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Updated from ref: $GITHUB_SHA"
git push