forked from kubearmor/KubeArmor
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.38 KB
/
ci-latest-helm-chart-release.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
38
39
40
41
42
43
44
45
46
name: ci-latest-helm-chart-release
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "deployments/helm/**"
# Declare default permissions as read only.
permissions: read-all
jobs:
publish-chart:
name: Update Stable Helm Chart With Latest Changes
if: ${{ (github.repository == 'kubearmor/kubearmor') }}
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Chart.yaml
run: |
STABLE_VERSION=`cat STABLE-RELEASE`
sed -i -e "s/appVersion:.*/appVersion: $STABLE_VERSION/g" deployments/helm/*/Chart.yaml
sed -i -e "s/version:.*/version: $STABLE_VERSION/g" deployments/helm/*/Chart.yaml
- name: Publish Helm chart
uses: delusionaloptimist/helm-gh-pages@master
env:
# Access token which can push to a different repo in the same org
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
with:
charts_dir: deployments/helm
# repo where charts would be published
owner: kubearmor
repository: charts
branch: gh-pages
charts_url: https://kubearmor.github.io/charts
commit_username: "github-actions[bot]"
commit_email: "github-actions[bot]@users.noreply.github.com"