Skip to content

Release Helm Chart

Release Helm Chart #2

Workflow file for this run

name: Release Helm Chart
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag which has to be updated"
type: "string"
required: true
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: "kubearmor/KubeArmor"
- uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Chart.yaml
if: ${{ github.event_name == "workflow_dispatch" }}

Check failure on line 27 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release Helm Chart

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 27, Col: 13): Unexpected symbol: '"workflow_dispatch"'. Located at position 22 within expression: github.event_name == "workflow_dispatch" .github/workflows/release.yaml (Line: 34, Col: 13): Unexpected symbol: '"release"'. Located at position 22 within expression: github.event_name == "release"
run: |
STABLE_VERSION=${{ inputs.tag }}
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: Update Chart.yaml
if: ${{ github.event_name == "release" }}
run: |
STABLE_VERSION=${{ github.event.release.tag_name }}
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:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: deployments/helm
commit_username: "github-actions[bot]"
commit_email: "github-actions[bot]@users.noreply.github.com"