-
Notifications
You must be signed in to change notification settings - Fork 9
44 lines (33 loc) · 1.35 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
name: Prerelease Helm Chart
on:
workflow_dispatch:
push:
branches:
- Helm_artifacts
env:
HELM_CHART_VERSION: 1.2.0
MATLAB_APP_VERSION: "R2025a"
jobs:
release-helm-chart:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Check that chart exists
run: |
CHART_DIR="releases/${{ env.MATLAB_APP_VERSION }}/matlab-prodserver" && cat ${CHART_DIR}/Chart.yaml
echo "CHART_DIR=${CHART_DIR}" >> $GITHUB_ENV # Add to env if exists
- name: Check chart versions
run: |
grep 'version: ${{ env.HELM_CHART_VERSION }}' ${CHART_DIR}/Chart.yaml && grep 'appVersion: "${{ env.MATLAB_APP_VERSION }}"' ${CHART_DIR}/Chart.yaml
- name: Package the chart
run: helm package ${CHART_DIR} --version ${{ env.HELM_CHART_VERSION }} --app-version ${{ env.MATLAB_APP_VERSION }}
- name: Login to GitHub Container Registry
run: echo ${{ secrets.CR_TOKEN }} | helm registry login ${{ secrets.MATHWORKS_REGISTRY }} --username ${{ secrets.CR_USER }} --password-stdin
- name: Deploy the chart
run: helm push matlab-prodserver-k8s-${{ env.HELM_CHART_VERSION }}.tgz oci://${{ secrets.MATHWORKS_REGISTRY }}