Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
branches:
- main
paths:
- 'charts/*/Chart.yaml'
- 'charts/**'
- 'Version.props'

permissions:
contents: write
Expand Down Expand Up @@ -48,10 +49,16 @@ jobs:
tar -xvf "${FILENAME}"
sudo mv helm-docs /usr/local/bin

- name: Set helm chart appVersion from Version.props
- name: Verify helm chart version matches Version.props
run: |
export VERSION_PROPS=$(awk -F'[<>]' '/VersionPrefix/{print $3}' Version.props | tr -d '\n')
sed -i -e 's#Version.props#"'${VERSION_PROPS}'"#g' charts/garnet/Chart.yaml
VERSION_PROPS=$(awk -F'[<>]' '/<VersionPrefix>/{print $3}' Version.props | tr -d '\n')
CHART_VERSION=$(awk '$1 == "version:" {print $2}' charts/garnet/Chart.yaml)
CHART_APP_VERSION=$(awk '$1 == "appVersion:" {print $2}' charts/garnet/Chart.yaml)

if [[ "${CHART_VERSION}" != "${VERSION_PROPS}" || "${CHART_APP_VERSION}" != "${VERSION_PROPS}" ]]; then
echo "Chart version (${CHART_VERSION}) and appVersion (${CHART_APP_VERSION}) must match Version.props (${VERSION_PROPS})"
exit 1
fi

- name: Helm lint, helm-docs and helm package
run: |
Expand All @@ -65,10 +72,6 @@ jobs:
helm package "${chart}" --dependency-update --destination .cr-release-packages
done

- name: Discard changes on the charts/garnet/Chart.yaml file
run: |
git checkout -- charts/garnet/Chart.yaml

- name: Commit and Push to Branch (no PR)
run: |
git config user.name "github-actions[bot]"
Expand Down
4 changes: 2 additions & 2 deletions charts/garnet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: garnet
description: A Helm chart for Microsoft Garnet
type: application
version: 0.2.2
appVersion: Version.props
version: 2.1.5
appVersion: 2.1.5
Comment thread
badrishc marked this conversation as resolved.
home: https://github.com/microsoft/garnet
icon: https://avatars.githubusercontent.com/u/6154722?s=200&v=4

Expand Down
2 changes: 1 addition & 1 deletion charts/garnet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# garnet

![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.65](https://img.shields.io/badge/AppVersion-1.0.65-informational?style=flat-square)
![Version: 2.1.5](https://img.shields.io/badge/Version-2.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.5](https://img.shields.io/badge/AppVersion-2.1.5-informational?style=flat-square)

A Helm chart for Microsoft Garnet

Expand Down