From 715e47147f8cd54f75e9ef9fa2f235797771389d Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 19 Aug 2024 13:16:26 +0200 Subject: [PATCH] Only push when there are any automated changes --- .github/workflows/bump-snapshots.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-snapshots.yml b/.github/workflows/bump-snapshots.yml index 4cea1c53..3d63ea58 100644 --- a/.github/workflows/bump-snapshots.yml +++ b/.github/workflows/bump-snapshots.yml @@ -29,4 +29,4 @@ jobs: - name: bump-rewrite-properties-to-snapshots run: | ./mvnw versions:update-properties -DincludeProperties=rewrite.version,rewrite.kotlin.version -DallowSnapshots=true - git diff-index --quiet HEAD pom.xml || git commit -m "Bump rewrite.version properties" pom.xml && git push origin main + git diff-index --quiet HEAD pom.xml || (git commit -m "Bump rewrite.version properties" pom.xml && git push origin main) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 468e6a95..c827dd8f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -61,4 +61,4 @@ jobs: - name: bump-rewrite-properties-to-snapshots run: | ./mvnw versions:update-properties -DincludeProperties=rewrite.version,rewrite.kotlin.version -DallowSnapshots=true - git diff-index --quiet HEAD pom.xml || git commit -m "Bump rewrite.version properties" pom.xml && git push origin main && rm -f pom.xml.versionsBackup + git diff-index --quiet HEAD pom.xml || (git commit -m "Bump rewrite.version properties" pom.xml && git push origin main && rm -f pom.xml.versionsBackup)