Skip to content

Commit be11ac6

Browse files
committed
[helm] feat: add helm github pages action to publish charts
1 parent a00b876 commit be11ac6

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
11+
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
12+
permissions:
13+
contents: write
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Configure Git
22+
run: |
23+
git config user.name "$GITHUB_ACTOR"
24+
git config user.email "[email protected]"
25+
26+
- name: Install Helm
27+
uses: azure/setup-helm@v1
28+
with:
29+
version: v3.8.1
30+
31+
- name: Run chart-releaser
32+
uses: helm/[email protected]
33+
with:
34+
charts_dir: hello-helm
35+
env:
36+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,18 @@ kubectl get pods -n dev
18931893

18941894
### helm chart 打包和发布
18951895

1896-
上面的例子说明我们可以一行命令在一个新的 namespace 环境中安装所有需要的 k8s 资源!这也同样说明我们教程需要的所有 k8s 资源,可以快速的进行打包、分发和下载!
1896+
上面的例子说明我们可以用一行命令在一个新的环境中安装所有需要的 k8s 资源!这也同样说明我们教程需要的所有 k8s 资源,可以快速的进行打包、分发和下载!
1897+
1898+
在 `hello-helm` 目录下,执行
1899+
1900+
```shell
1901+
helm package .
1902+
# Successfully packaged chart and saved it to: /Users/guangzheng.li/workspace/k8s-tutorials/hello-helm/hello-helm-0.1.0.tgz
1903+
1904+
helm repo index .
1905+
```
1906+
1907+
18971908

18981909
## Dashboard(TODO)
18991910

0 commit comments

Comments
 (0)