From 8af1f241b96590c90dbf4227856245343b366c61 Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 00:50:30 +0800 Subject: [PATCH] Update automatic-update.yml --- .github/workflows/automatic-update.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/automatic-update.yml b/.github/workflows/automatic-update.yml index 341a5d8..8217dd3 100644 --- a/.github/workflows/automatic-update.yml +++ b/.github/workflows/automatic-update.yml @@ -34,18 +34,15 @@ jobs: sed -i "s/\(purpurRef\s*=\s*\).*/\1$PAPER_REF/" gradle.properties env: PAPER_REF: ${{ steps.purpurRef.outputs.purpurRef }} - - name: Check for changes - run: | - cd DivineMC - if git diff --quiet; then - echo "No changes to commit." - exit 0 - fi - - name: Write to repository + - name: Check for changes and Write to repository run: | cd DivineMC - git add gradle.properties - git config user.name "HaHaWTH" - git config user.email HaHaWTH@users.noreply.github.com - git commit -m "Updated Upstream (Purpur)" - git push + if ! git diff --quiet; then + git add gradle.properties + git config user.name "HaHaWTH" + git config user.email HaHaWTH@users.noreply.github.com + git commit -m "Updated Upstream (Purpur)" + git push + else + echo "No changes to commit." + fi