Skip to content
Merged
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: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ on:
pull_request: {}

jobs:
check-version-bump:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check Chart.yaml version was bumped
run: |
BASE_VERSION=$(git show origin/${{ github.base_ref }}:charts/postgres-db-admin-operator/Chart.yaml | grep '^version:' | awk '{print $2}')
PR_VERSION=$(grep '^version:' charts/postgres-db-admin-operator/Chart.yaml | awk '{print $2}')
echo "Base version: $BASE_VERSION"
echo "PR version: $PR_VERSION"
if [ "$BASE_VERSION" = "$PR_VERSION" ]; then
echo "Error: Chart version was not bumped (still $PR_VERSION)"
exit 1
fi

unit-tests:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
id: chart
run: |
echo "version=$(grep '^version:' ${{ env.CHART_FILE }} | awk '{print $2}')" >> $GITHUB_OUTPUT
echo "chart_changed=$( git diff --name-only HEAD~1 HEAD | grep -q '${{ env.CHART_FILE }}' && echo true || echo false)" >> $GITHUB_OUTPUT

- name: Log in to GHCR
uses: docker/login-action@v3
Expand Down Expand Up @@ -54,7 +53,6 @@ jobs:
registry_password: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub release
if: steps.chart.outputs.chart_changed == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.chart.outputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions charts/postgres-db-admin-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: postgres-db-admin-operator
description: Kubernetes operator for managing PostgreSQL databases
type: application
version: 0.0.7
appVersion: 0.0.7
version: 0.0.8
appVersion: 0.0.8
Loading