Skip to content
Merged
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
24 changes: 13 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,30 @@ jobs:
files: |
config/crd/bases/*.yaml

- name: Update chart version
- name: Commit and push chart version
run: |
# Extract version without 'v' prefix
VERSION="${GITHUB_REF_NAME#v}"

# Update Chart.yaml
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Fetch the latest main branch
git fetch origin main

# Checkout main branch
git checkout main

# Apply version updates on main
sed -i "s/^version: .*/version: ${VERSION}/" charts/cloudnative-supabase/Chart.yaml
sed -i "s/^appVersion: .*/appVersion: ${VERSION}/" charts/cloudnative-supabase/Chart.yaml

# Update values.yaml image tag
sed -i "s/^ tag: .*/ tag: \"${VERSION}\"/" charts/cloudnative-supabase/values.yaml

- name: Commit and push chart version
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add charts/cloudnative-supabase/Chart.yaml charts/cloudnative-supabase/values.yaml

# Only commit if there are staged changes
if git diff --cached --quiet; then
echo "Chart already at correct version, skipping commit"
else
git commit -m "chore(chart): bump to ${GITHUB_REF_NAME#v}"
git push origin HEAD:main
git commit -m "chore(chart): bump to ${VERSION}"
git push origin main
fi