-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (40 loc) · 1.46 KB
/
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: 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' }}
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"