From 16e60b4ff0d37d4629e8bd9b16af9bca97d5f264 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:25:40 -0500 Subject: [PATCH] [ci skip] Fix auto update --- .github/workflows/auto-update.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 4b3ed748..5b5cb079 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -1,7 +1,7 @@ name: Automatically update Gale commit hash on: - workflow_dispatch: {} + workflow_dispatch: schedule: - cron: "0 0 * * *" @@ -9,20 +9,20 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Leaf Repository + - name: Checkout Leaf repository uses: actions/checkout@v3 with: path: 'Leaf' token: ${{ secrets.GITHUB_TOKEN }} - - name: Checkout Gale Repository + - name: Checkout Gale repository uses: actions/checkout@v3 with: path: 'Gale' repository: "Dreeam-qwq/Gale" token: ${{ secrets.GITHUB_TOKEN }} - - name: Get Gale Latest Commit Hash + - name: Get Gale latest commit Hash id: galeCommit run: | ls @@ -30,7 +30,7 @@ jobs: echo "::set-output name=galeCommit::$(git rev-parse HEAD)" cd .. - - name: Update galeCommit in Leaf  + - name: Update galeCommit in Leaf run: | cd Leaf sed -i "s/\(galeCommit\s*=\s*\).*/\1$PAPER_REF/" gradle.properties @@ -39,6 +39,8 @@ jobs: - name: Grant execute permission for gradlew run: | + git config --global user.name "github-actions" + git config --global user.email no-reply@github.com cd Leaf chmod +x gradlew @@ -47,20 +49,17 @@ jobs: cd Leaf if ! git diff --quiet; then echo "Running tests...." - git config --global user.name "github-actions" - git config --global user.email no-reply@github.com ./gradlew applyPatches ./gradlew createReobfPaperclipJar fi - - name: Check for changes and Write to repository + - name: Check for changes and write to repository run: | cd Leaf if ! git diff --quiet; then echo "Writing to repo....." git add gradle.properties - git config --global user.name "github-actions" - git config --global user.email no-reply@github.com + git add patches/* git commit -m "Updated Upstream (Gale)" git push else