-
Notifications
You must be signed in to change notification settings - Fork 131
85 lines (71 loc) · 2.33 KB
/
publish_helm_chart.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
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
name: Publish Opik Helm Chart
run-name: "Publish Opik Helm Chart ${{ github.ref_name }} by @${{ github.actor }}"
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: Version
default: ""
workflow_call:
inputs:
version:
type: string
required: true
description: Version
default: ""
jobs:
publish-helm-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
ref: ${{inputs.version}}
fetch-tags: true
path: 'src'
fetch-depth: 0
- name: Checkout GH Pages branch
uses: actions/[email protected]
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.13.0
- name: Run lint on Helm chart
shell: bash
working-directory: src
run: |
set -e
cd deployment/helm_chart/opik
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build
helm lint --values values.yaml .
cd -
- name: Package helm chart
shell: bash
working-directory: src
run: |
cd deployment/helm_chart
helm package --version ${{inputs.version}} --app-version ${{inputs.version}} opik/ -u -d ../../../dest
cd -
echo "Copy updated README"
cp deployment/helm_chart/opik/README.md ../dest/.
- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/comet-ml/opik/gh-pages/
git config user.name "Helm Updater"
git config user.email "[email protected]"
git add $(git ls-files -o --exclude-standard)
git add index.yaml README.md
git commit -m "Release Opik helm chart ${{inputs.version}}"
git push
- name: Summary
run: |
echo "Helm chart is published, version is : ${{inputs.version}}" >> $GITHUB_STEP_SUMMARY