-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (40 loc) · 1.19 KB
/
helm-publish-on-commit.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
name: Helm publish on new commit on main branch
on:
push:
branches:
- 'main'
jobs:
chart-publish-on-commit:
runs-on: ubuntu-latest
steps:
- name: main Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
path: georchestra
- name: gh-pages Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'gh-pages'
path: gh-pages
- name: Helm Installation
uses: azure/setup-helm@v3
- name: Run script file
run: |
rm -rf georchestra/.git
shell: bash
- name: Helm Package
run: |
cd georchestra && helm dependency update && cd ..
helm package georchestra -d gh-pages --version $(helm show chart georchestra |grep ^version: | awk '{print $2}')-"$GITHUB_REF_NAME"-"${GITHUB_SHA::7}"
cd gh-pages
find . -type f -mtime +180 -delete
helm repo index . --merge index.yaml
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}