Skip to content

Commit 0616753

Browse files
authored
Merge pull request #14 from Nullify-Platform/fix-pipeline
try this
2 parents b0e5de3 + 52dc399 commit 0616753

File tree

2 files changed

+5
-40
lines changed

2 files changed

+5
-40
lines changed

.github/workflows/auto-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
```bash
6464
helm repo add nullify https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
6565
helm repo update
66-
helm install nullify-collector nullify/k8s-collector --version ${{ steps.chart-version.outputs.version }}
66+
helm install nullify-collector nullify/nullify-k8s-collector --version ${{ steps.chart-version.outputs.version }}
6767
```
6868
6969
### 📚 Documentation

.github/workflows/helm-release.yml

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
paths:
77
- 'aws-integration-setup/charts/**'
88
- '.github/workflows/helm-release.yml'
9-
tags:
10-
- 'v*'
119
workflow_dispatch:
1210

1311
permissions:
@@ -38,45 +36,12 @@ jobs:
3836
with:
3937
version: v3.14.0
4038

41-
- name: Determine version
39+
- name: Get Chart Version
4240
id: version
4341
run: |
44-
if [[ $GITHUB_REF == refs/tags/* ]]; then
45-
# Use tag version (remove 'v' prefix)
46-
VERSION=${GITHUB_REF#refs/tags/v}
47-
echo "version=$VERSION" >> $GITHUB_OUTPUT
48-
echo "Using tag version: $VERSION"
49-
else
50-
# Auto-increment patch version for main branch commits
51-
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
52-
LATEST_VERSION=${LATEST_TAG#v}
53-
54-
# Parse semantic version
55-
IFS='.' read -ra VERSION_PARTS <<< "$LATEST_VERSION"
56-
MAJOR=${VERSION_PARTS[0]:-0}
57-
MINOR=${VERSION_PARTS[1]:-0}
58-
PATCH=${VERSION_PARTS[2]:-0}
59-
60-
# Increment patch version
61-
NEW_PATCH=$((PATCH + 1))
62-
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
63-
64-
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
65-
echo "Auto-incremented version: $LATEST_VERSION -> $NEW_VERSION"
66-
fi
67-
68-
- name: Update Chart version
69-
run: |
70-
VERSION="${{ steps.version.outputs.version }}"
71-
72-
# Update Chart.yaml with new version
73-
sed -i "s/^version:.*/version: $VERSION/" aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml
74-
75-
# Optionally update appVersion to match
76-
sed -i "s/^appVersion:.*/appVersion: \"$VERSION\"/" aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml
77-
78-
echo "Updated Chart.yaml to version $VERSION"
79-
cat aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml | grep -E "^(version|appVersion):"
42+
VERSION=$(grep '^version:' aws-integration-setup/charts/nullify-k8s-collector/Chart.yaml | awk '{print $2}' | tr -d '"')
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
echo "Using Chart.yaml version: $VERSION"
8045
8146
- name: Add Helm repos (if chart has dependencies)
8247
run: |

0 commit comments

Comments
 (0)