diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 13219cf..976ac82 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -38,7 +38,19 @@ jobs: - name: Bump version run: ruby .github/scripts/version_bump.rb + - name: Check for changes + id: check_changes + run: | + if git diff --exit-code; then + echo "No changes to commit" + echo "changed=false" >> $GITHUB_ENV + else + echo "Changes detected" + echo "changed=true" >> $GITHUB_ENV + fi + - name: Commit and push changes + if: env.changed == 'true' run: | git config user.name "github-actions" git config user.email "actions@github.com"