-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (63 loc) · 1.95 KB
/
helm-chart.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
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
name: Helm chart
on:
push:
branches: [ main ]
paths:
- 'chart/**'
pull_request:
branches: [ main ]
paths:
- 'chart/**'
jobs:
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@v4
- name: Lint
run: helm lint chart
validation:
name: Validate manifests
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1.29.8', '1.30.4', '1.31.0']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@v4
- name: Install plugin
run: helm plugin install https://github.com/jtyr/kubeconform-helm
- name: Validate
run: helm kubeconform --summary -f .github/values.yml chart
release-chart:
name: Package and release Helm chart
if: ${{ github.event_name != 'pull_request' }}
needs: [lint, validation]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Helm
uses: azure/setup-helm@v4
- name: Check version bump
id: check
run: |
version="$(grep 'version:' ./chart/Chart.yaml | tail -n1 | awk '{ print $2 }')"
! helm show chart oci://ghcr.io/chialab/helm-charts/print2pdf-go --version ${version} >/dev/null 2>&1 || (echo "Did you forget to bump Chart version?"; exit 1)
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: Package chart
run: helm package chart
- name: Publish chart
run: helm push "print2pdf-go-${{ steps.check.outputs.version }}.tgz" oci://ghcr.io/chialab/helm-charts