-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.5 KB
/
chart-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
name: Release Charts
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Publish Helm Chart
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
CHART_NAME: bioscfg
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
path: ${{ env.CHART_NAME }}
fetch-depth: 0
-
name: Checkout Helm chart Repo
uses: actions/checkout@v4
with:
repository: metal-toolbox/${{ env.CHART_NAME }}
path: helm-charts
ref: gh-pages
fetch-depth: 0
-
name: Install Helm
uses: azure/[email protected]
-
name: Package Helm Chart
run: |
helm package --version ${{ github.ref_name }} ./${{ env.CHART_NAME }}/chart -u -d ./helm-charts/
helm repo index ./helm-charts/ --url https://metal-toolbox.github.io/${{ env.CHART_NAME }}/
-
name: Create Git Commit
run: |
cd helm-charts
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add index.yaml *.tgz
git commit -m "published ${{ env.CHART_NAME }}-${{ github.ref_name }}.tgz"
-
name: Push Changes
uses: ad-m/github-push-action@master
with:
repository: metal-toolbox/${{ env.CHART_NAME }}
directory: helm-charts
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages