-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.45 KB
/
index.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
62
name: Update Helm repository
run-name: ${{ github.actor }} is updating the Helm repository
on:
workflow_dispatch:
push:
branches:
- main
paths:
- charts/**
jobs:
package:
runs-on: ubuntu-latest
steps:
- name: 'Git Checkout'
uses: actions/checkout@v3
- name: 'Configure & Install Helm'
uses: azure/setup-helm@v3
- name: 'Package & Update Helm Repository'
run: |
helm package charts/* -d repo/
helm repo index repo/
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add repo
git commit -m 'Update Helm repository chart index'
git push
release:
runs-on: ubuntu-latest
needs: package
steps:
- name: 'Git Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Configure & Install Helm'
uses: azure/setup-helm@v3
- name: 'Authorize Helm with remote container registry'
run: |
echo "TODO"
- name: 'Push modified Helm packages to the container registry'
env:
HELM_EXPERIMENTAL_OCI: '1'
run: |
git pull origin main # Pull latest changes from main.
git diff --name-only -r HEAD^1 HEAD | grep .tgz | while read line || [[ -n $line ]];
do
echo " > Pushing chart $line"
helm push $line oci://nexus.global.dns:8443/charts/charts
done