Merge pull request #1803 from Prateeknandle/csp-fix #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |