-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.94 KB
/
build-push-charts.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
name: Build and Push Charts
on:
push:
branches:
- main
env:
# https://github.com/kubernetes-sigs/kubectl-validate/releases
KUBECTL_VALIDATE_VERSION: v0.0.1
jobs:
build-push:
name: Build and push charts
runs-on: ubuntu-latest
strategy:
matrix:
chart:
- genius-core
- genius-core-admin
include:
- chart: genius-core
version: 0.1.0
- chart: genius-core-admin
version: 0.1.0
permissions:
contents: read
packages: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Lint
run: helm lint charts/${{ matrix.chart }} --strict --debug
- name: Build chart
run: |-
mkdir -p dist/
helm package charts/${{ matrix.chart }} --destination dist/
- name: Login to the internal helm registry
run: |-
echo "${HELM_INTERNAL_REGISTRY_PASSWORD}" | helm registry login registry.develop.verses.io/helm-internal --username "${HELM_INTERNAL_REGISTRY_USERNAME}" --password-stdin
env:
HELM_INTERNAL_REGISTRY_USERNAME: ${{ secrets.HELM_INTERNAL_REGISTRY_USERNAME }}
HELM_INTERNAL_REGISTRY_PASSWORD: ${{ secrets.HELM_INTERNAL_REGISTRY_PASSWORD }}
- name: Push chart to verses
run: |-
helm push dist/${{ matrix.chart }}-${{ matrix.version }}.tgz oci://registry.develop.verses.io/helm-internal
- name: Login to ghcr
run: |-
echo "${HELM_GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io/versestech/helm-charts --username "${HELM_GHCR_REGISTRY_USERNAME}" --password-stdin
env:
HELM_GHCR_REGISTRY_USERNAME: ${{ github.actor }}
HELM_GHCR_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
- name: Push chart to ghcr
run: |-
helm push dist/${{ matrix.chart }}-${{ matrix.version }}.tgz oci://ghcr.io/versestech/helm-charts