-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (69 loc) · 2.04 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
name: Publish Chart
on:
push:
branches:
- main
paths:
- 'helm/**'
tags:
- '*'
jobs:
lint-chart:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12.0'
check-latest: true
- name: Cache dependecies
uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-helm-${{ hashFiles('**/Chart.yaml') }}
restore-keys: |
${{ runner.os }}-helm-${{ hashFiles('**/Chart.yaml') }}
- name: Create Kind Cluster
uses: helm/[email protected]
- name: Run Chart testing
uses: helm/[email protected]
with:
config: ct.yaml
release:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- lint-chart
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 "[email protected]"
- name: Copy CRDs to it's chart
run: |
cp -rf config/crd/bases/* helm/osko-crds/charts/crds/templates/
cp -rf config/crd/bases/* helm/osko/charts/crds/templates/
- name: Install Helm
uses: azure/setup-helm@v3
- name: Add dependency chart repos
run: |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
charts_dir: helm
skip_existing: false
packages_with_index: true