aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/helm_ci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/helm_ci.yaml')
-rw-r--r--.github/workflows/helm_ci.yaml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/helm_ci.yaml b/.github/workflows/helm_ci.yaml
index 523f42a..aa4cdbf 100644
--- a/.github/workflows/helm_ci.yaml
+++ b/.github/workflows/helm_ci.yaml
@@ -41,6 +41,32 @@ jobs:
echo "::set-output name=changed::true"
fi
+ - name: Check if Chart version was updated
+ if: github.event_name == 'pull_request'
+ run: |
+ # Get the base branch chart version
+ git fetch origin ${{ github.base_ref }}
+ BASE_VERSION=$(git show origin/${{ github.base_ref }}:deploy/helm/seaweedfs-csi-driver/Chart.yaml | grep '^version:' | awk '{print $2}')
+
+ # Get the current chart version
+ CURRENT_VERSION=$(grep '^version:' deploy/helm/seaweedfs-csi-driver/Chart.yaml | awk '{print $2}')
+
+ echo "Base version: $BASE_VERSION"
+ echo "Current version: $CURRENT_VERSION"
+
+ # Check if Helm files were changed
+ HELM_FILES_CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -c "^deploy/helm/" || echo "0")
+
+ if [ "$HELM_FILES_CHANGED" -gt 0 ]; then
+ if [ "$BASE_VERSION" = "$CURRENT_VERSION" ]; then
+ echo "::warning::Helm chart files were modified but Chart version was not updated!"
+ echo "::warning::Please update the version in deploy/helm/seaweedfs-csi-driver/Chart.yaml"
+ echo "::warning::Current version: $CURRENT_VERSION"
+ else
+ echo "✓ Chart version was updated from $BASE_VERSION to $CURRENT_VERSION"
+ fi
+ fi
+
- name: Run chart-testing (lint)
run: ct lint --all --validate-maintainers=false --chart-dirs deploy/helm/seaweedfs-csi-driver/