-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 1.14 KB
/
action.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
name: Deploy Helm Chart
on:
push:
branches:
- master
permissions: write-all
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Random Semantic Version
id: random-version
run: echo "::set-output name=version::$(echo v0.$((1 + RANDOM % 9)).$((1 + RANDOM % 9)))-${{ github.run_number }}"
- name: Package Helm Chart
uses: docker://projectoss/helm-client:v3.11.3
with:
run: |
helm version
helm package --version ${{ steps.random-version.outputs.version }} ./tomcat-chart
- name: Update chart repo index in gh-pages branch
run: |
helm repo index --merge index.yaml .
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "feat: Update chart index with version ${{ steps.random-version.outputs.version }}"
git push https://dinushchathurya:${{ secrets.PAT_TOKEN }}@github.com/dinushchathurya/helm-client-chart.git HEAD:master -f