Skip to content

Commit a42bcb7

Browse files
Slachaider-chat-bot
andcommitted
fix: add conditional check to prevent unnecessary commits in Helm chart workflow
Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <[email protected]>
1 parent d4c5a64 commit a42bcb7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/build-altinity-mcp.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,17 @@ jobs:
285285
sed -i "s/^version: .*/version: $VERSION/" helm/altinity-mcp/Chart.yaml
286286
sed -i "s/^appVersion: .*/appVersion: \"$VERSION\"/" helm/altinity-mcp/Chart.yaml
287287
288-
# Commit updated Chart.yaml
289-
git config --local user.email "[email protected]"
290-
git config --local user.name "GitHub Action"
291-
git add helm/altinity-mcp/Chart.yaml
292-
git commit -m "Update Helm chart version to $VERSION"
293-
git push origin main
288+
# Check if Chart.yaml has changes
289+
if git diff --quiet helm/altinity-mcp/Chart.yaml; then
290+
echo "No changes to Chart.yaml, skipping commit"
291+
else
292+
# Commit updated Chart.yaml
293+
git config --local user.email "[email protected]"
294+
git config --local user.name "GitHub Action"
295+
git add helm/altinity-mcp/Chart.yaml
296+
git commit -m "Update Helm chart version to $VERSION"
297+
git push origin main
298+
fi
294299
295300
# Login to GitHub Container Registry
296301
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

0 commit comments

Comments
 (0)