-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.24 KB
/
helm.yml
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
name: Release Helm Charts
concurrency: release-helm
on:
workflow_dispatch:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: 'src'
ref: 'master'
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v1
- name: Update New Files and push to master branch
shell: bash
working-directory: src
run: |
for app in "./charts/"*; do
if [[ -d $app ]]; then
highest_version=$(ls -d $app/v* | sort -V | tail -n 1)
helm package $highest_version -d ../dest/
fi
done
helm repo index ../dest/ --url https://adhoc-dev.github.io/helm-charts/ --merge ../dest/index.yaml
- name: Push New Files
shell: bash
working-directory: dest
run: |
git config user.name "helm"
git config user.email "[email protected]"
git add .
git commit -m "Updated from ref: $GITHUB_SHA"
git push