-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (78 loc) · 2.59 KB
/
agh3-auto-release.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: ⚙️ [AGH3] Auto Release Chart
on:
push:
branches:
- main
- orphan/**
paths:
- charts/agh3/**
- .github/workflows/agh3-auto-release.yaml
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 🔔 Checkout
uses: actions/checkout@v4
with:
path: src
fetch-depth: 0
- name: 🔔 Checkout
uses: actions/checkout@v4
with:
path: dest
ref: "gh-pages"
fetch-depth: 0
- name: "🔔 Checkout (OEM: ArrayBAS)"
uses: actions/checkout@v4
with:
repository: Leukocyte-Lab/arraybas-charts
path: dest-arraybas
token: "${{ secrets.GH_TOKEN }}"
ref: "gh-pages"
fetch-depth: 0
- name: 🪝 Install Helm
uses: azure/setup-helm@v4
with:
version: v3.13.3
- name: 📦 Packing Helm Charts
shell: bash
run: |
helm dep up src/charts/agh3
helm package src/charts/agh3 -u -d dest
- name: "🖍️ Update manifest for (OEM: ArrayBAS)"
uses: mikefarah/[email protected]
with:
cmd: |
cp src/charts/agh3/values.yaml src/charts/agh3/values.yaml.tmp
cat src/charts/agh3/values.yaml.tmp | \
yq '.name = "bas"' | \
yq '.description = "A Helm chart for BAS3"' | \
yq '.' > src/charts/agh3/values.yaml
rm src/charts/agh3/values.yaml.tmp
- name: "📦 Packing Helm Charts (OEM: ArrayBAS)"
shell: bash
run: |
helm dep up src/charts/agh3
helm package src/charts/agh3 -u -d dest-arraybas
- name: 🎁 Release Chart
shell: bash
working-directory: dest
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
helm repo index . --url https://charts.lkc-lab.com/ --merge index.yaml
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Release from ref: $GITHUB_SHA"
git push
- name: "🎁 Release Chart (OEM: ArrayBAS)"
shell: bash
working-directory: dest-arraybas
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
helm repo index . --url https://chart_bas.arraynetworks.com/ --merge index.yaml
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Release from ref: $GITHUB_SHA"
git push