File tree Expand file tree Collapse file tree 2 files changed +87
-1
lines changed
Expand file tree Collapse file tree 2 files changed +87
-1
lines changed Original file line number Diff line number Diff line change 11name : code check
22
3- on : [push, pull_request]
3+ on :
4+ push :
5+ branches : [ main ]
6+ paths-ignore :
7+ - .github/**
8+ - charts/**
9+ - config/**
10+ - docs/**
11+ - hack/**
12+ pull_request :
13+ branches : [ main ]
14+ paths-ignore :
15+ - .github/**
16+ - charts/**
17+ - config/**
18+ - docs/**
19+ - hack/**
420
521jobs :
622
Original file line number Diff line number Diff line change 1+ name : Publish Charts
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ build :
8+ runs-on : ubuntu-20.04
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v2
12+ with :
13+ fetch-depth : 0
14+
15+ - name : Set up Helm
16+ uses : azure/setup-helm@v1
17+ with :
18+ version : v3.6.3
19+
20+ - name : Packaging the chart
21+ run : helm package ./charts/mysql-operator/
22+
23+ - uses : actions/upload-artifact@v2
24+ with :
25+ name : mysql-operator-chart
26+ path : ./mysql-operator-*.tgz
27+ retention-days : 1
28+
29+ publish :
30+ name : Publish charts on GitHub Pages
31+ runs-on : ubuntu-20.04
32+ needs : build
33+ steps :
34+ - uses : actions/checkout@v2
35+ with :
36+ ref : operator-charts
37+
38+ - name : Set up Helm
39+ uses : azure/setup-helm@v1
40+ with :
41+ version : v3.6.3
42+
43+ - uses : actions/download-artifact@v2
44+ with :
45+ name : mysql-operator-chart
46+
47+ - name : Update charts index
48+ run : |
49+ helm repo index --url https://radondb.github.io/radondb-mysql-kubernetes/ --merge index.yaml .
50+ git add .
51+
52+ - name : Check diffs
53+ run : |
54+ diffs=$(git status -s)
55+ if [ "$diffs" = "" ]; then
56+ echo "NO_DIFF=1" >> $GITHUB_ENV
57+ else
58+ printf "%s\n" "$diffs"
59+ fi
60+
61+ - name : Commit and push
62+ if : env.NO_DIFF != '1'
63+ uses : stefanzweifel/git-auto-commit-action@v4
64+ with :
65+ commit_message : update chart repo
66+
67+ - uses : ad-m/github-push-action@master
68+ with :
69+ github_token : ${{ secrets.GITHUB_TOKEN }}
70+ branch : operator-charts
You can’t perform that action at this time.
0 commit comments