-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.28 KB
/
helm.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
name: Helm Chart
on:
push:
branches:
- main
tags:
- "*"
jobs:
helm:
name: Publish to GitHub 📦
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Configure Git 📖
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm ⚙️
uses: azure/setup-helm@v3
- name: Login to Helm Registry 🔑
run: |
helm registry login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Setup Node.js 📦
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies 🔧
run: |
npm ci --include=dev
- name: Build chart 🚚
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
sed -i "s/0.0.0/${GITHUB_REF_NAME}/g" helm/Chart.yaml
else
sed -i "s/0.0.0/0.0.0-${GITHUB_SHA::7}/g" helm/Chart.yaml
fi
npm run build:chart -- --image cubos/disk-resizer-controller:$VERSION
- name: Publish chart 🚀
run: |
helm push *.tgz oci://ghcr.io/cubos/charts