Release Helm Chart #2
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: 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 GitHub Actions / Release Helm ChartInvalid workflow file
|
||
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" |