From 91c931d3aa982af6e49d545a971fa0e62ca490d9 Mon Sep 17 00:00:00 2001 From: Mike Deeks Date: Thu, 4 Sep 2025 11:12:14 -0700 Subject: [PATCH] Dont commit if there are no changes --- .github/workflows/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 227e297..e772d7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,16 +79,25 @@ jobs: git fetch origin main git checkout main + # Update services versions if provided if [ "${{ inputs.services_version }}" != "" ]; then ./lock_versions ${{ inputs.services_version }} git add . - git commit -m "Update Braintrust Services versions to ${{ inputs.services_version }}" + if ! git diff --staged --quiet; then + git commit -m "Update Braintrust Services versions to ${{ inputs.services_version }}" + else + echo "No changes to commit for services version update" + fi fi - # Commit and push the version update + # Update Chart version sed -i "s/^version: .*/version: ${{ github.event.inputs.version }}/" $CHART_PATH/Chart.yaml git add $CHART_PATH/Chart.yaml - git commit -m "Update Chart version to ${{ github.event.inputs.version }}" + if ! git diff --staged --quiet; then + git commit -m "Update Chart version to ${{ github.event.inputs.version }}" + else + echo "No changes to commit for Chart version update" + fi git push origin main