Skip to content

Merge pull request #1757 from rksharma95/fix-controller #13

Merge pull request #1757 from rksharma95/fix-controller

Merge pull request #1757 from rksharma95/fix-controller #13

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: stefanprodan/helm-gh-pages@master
with:
# Access token which can push to a different repo in the same org
token: ${{ secrets.GH_ACCESS_TOKEN }}
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"