-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.75 KB
/
release.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
53
54
55
56
name: CI Release Helm Chart
on:
release:
types: [published]
env:
REPO_NAME: skipper
jobs:
release-helm-chart:
name: Release Helm Chart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Login to GitHub Container Registry
run: |
REPO_OWNER=`echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- run: yarn install
- run: yarn update-all-charts
- run: yarn helm-lint
- name: Check Helm Chart Document
run: |
code=0
yarn helm-docs || code=$?;
if [ "$code" != "0" ]; then
echo "Failed to run helm-docs!";
exit 1;
fi;
code=0
git ls-files -m | grep -i readme.md || code=$?;
if [ "$code" == "0" ]; then
echo -e "Some of helm chart docs are required to be updated using the [helm-docs](https://github.com/norwoodj/helm-docs) tool. \n
Please run helm-docs (v1.11.3) at project root, review & commit docs changes and push a new commit.";
exit 1;
else
echo -e "helm docs check passed. helm docs update is not required.";
fi;
- name: helm-chart-version-check
run: yarn check-helm-chart-version ${REPO_NAME}/Chart.yaml
- name: Release Helm Chart
run: |
REPO_OWNER=`echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
helm package ${REPO_NAME}
PKG_NAME=`ls *.tgz`
helm push ${PKG_NAME} oci://ghcr.io/${REPO_OWNER}/charts