-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (66 loc) · 2.32 KB
/
helm.yml
File metadata and controls
80 lines (66 loc) · 2.32 KB
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
name: helm
on:
pull_request:
push:
tags: ['chart/v[0-9]+\.[0-9]+\.[0-9]+']
concurrency:
group: helm-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Compute workflow metadata
id: workflow-metadata
uses: ./.github/actions/workflow-metadata
- name: Install mise and setup helm
uses: jdx/mise-action@v4
with:
mise_toml: |
[tools]
helm = "latest"
- name: Set versions
id: versions
run: |
case '${{ steps.workflow-metadata.outputs.workflow-type }}' in
PR)
CHART_VERSION_SUFFIX='-pr.${{ github.event.number }}'
;;
main)
CHART_VERSION_SUFFIX='-main'
;;
release)
CHART_VERSION_SUFFIX=''
;;
*)
echo "unknown workflow type '${{ steps.workflow-metadata.outputs.workflow-type }}'" >&2
exit 1
;;
esac
CHART_VERSION="${{ steps.workflow-metadata.outputs.chart-version-latest }}${CHART_VERSION_SUFFIX}"
APP_VERSION='${{ steps.workflow-metadata.outputs.app-version-tag }}'
echo "app-version=${APP_VERSION}" | tee --append "${GITHUB_OUTPUT}"
echo "chart-version=${CHART_VERSION}" | tee --append "${GITHUB_OUTPUT}"
- name: Patch helm chart
uses: ./.github/actions/patch-helm-chart
with:
chart-version: ${{ steps.versions.outputs.chart-version }}
app-version: ${{ steps.versions.outputs.app-version }}
- name: Install chart dependencies
run: helm dependencies update ./helm/nebari-chat
- name: Package helm chart
run: helm package ./helm/nebari-chat
- name: Login to Quay.io
uses: docker/login-action@v4
with:
registry: quay.io
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: Push helm chart
shell: bash
run: helm push nebari-chat-*.tgz oci://quay.io/nebari/charts