This repository was archived by the owner on Oct 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types : [published]
4+ name : " Publish Helm Charts"
5+ jobs :
6+ helm :
7+ name : Package and Publish
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v2
11+ - name : " Install yq"
12+ run : |
13+ sudo snap install yq
14+ - name : Parse Tag
15+ run : echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
16+ - name : " Publish Helm Chart"
17+ env :
18+ HELM_REGISTRY : https://charts.securecodebox.io
19+ USERNAME : ${{ secrets.HELM_REGISTRY_USERNAME }}
20+ PASSWORD : ${{ secrets.HELM_REGISTRY_PASSWORD }}
21+ run : |
22+ package_publish () {
23+ echo "Linting Helm Chart"
24+ helm lint .
25+ echo "Packaging Helm Chart"
26+ helm package --version $RELEASE_VERSION .
27+ echo "Publising Helm Chart"
28+ curl --data-binary "@$(cat Chart.yaml | yq read - name)-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
29+ }
30+
31+ # Publishing
32+
33+ # Operator
34+ cd operator
35+ package_publish
36+ cd -
37+
38+ # Scanner
39+ for dir in scanners/*/
40+ do
41+ cd $dir
42+ echo "Processing Chart in: $dir"
43+ if [ -f Chart.yaml ]; then
44+ package_publish
45+ fi
46+ # cd back
47+ cd -
48+ done
49+
50+ # Hooks
51+ for dir in hooks/*/
52+ do
53+ cd $dir
54+ echo "Processing Chart in: $dir"
55+ if [ -f Chart.yaml ]; then
56+ package_publish
57+ fi
58+ # cd back
59+ cd -
60+ done
You can’t perform that action at this time.
0 commit comments