-
-
Notifications
You must be signed in to change notification settings - Fork 16
52 lines (42 loc) · 1.41 KB
/
chart-build-publish.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
name: Chart build and publish
on:
push:
branches:
- master
- fix/auto-release
jobs:
chart-lint-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.4.0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
- name: Helm build packages
run: sudo ./build.sh
- name: Commit files
run: |
DIST_DIR=.dist
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
TARGET_BRANCH=gh-pages
REMOTE_REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git config --local user.email "[email protected]"
git config --local user.name "Auto Release Bot"
git status
git add $DIST_DIR
git commit -m "[skip ci] Build and Publish Charts"
git push $REMOTE_REPO $CURRENT_BRANCH
git subtree split --prefix $DIST_DIR -b $TARGET_BRANCH
git push -f ${REMOTE_REPO} $TARGET_BRANCH:$TARGET_BRANCH