From 99ef472693cba53c05c738d5eb20c9fadf04e3be Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:30:28 +0800 Subject: [PATCH 01/10] Create auto-update.yml --- .github/workflows/auto-update.yml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/auto-update.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 000000000..655fee1ba --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,48 @@ +name: Automatically update Gale commit hash +on: + workflow_dispatch: {} + schedule: + - cron: "0 0 * * *" +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Leaf Repository + uses: actions/checkout@v3 + with: + path: 'Leaf' + token: ${{ secrets.GITHUB_TOKEN }} +   + - name: Checkout Gale Repository + uses: actions/checkout@v3 + with: + path: 'Gale' + repository: "GaleMC/Gale" + token: ${{ secrets.GITHUB_TOKEN }} +   + - name: Get Gale Latest Commit Hash + id: galeRef + run: | + ls + cd Gale + echo "::set-output name=galeRef::$(git rev-parse HEAD)" + cd .. +   + - name: Update galeRef in Leaf  + run: | + cd Leaf + sed -i "s/\(galeRef\s*=\s*\).*/\1$PAPER_REF/" gradle.properties + env: + PAPER_REF: ${{ steps.galeRef.outputs.galeRef }} + - name: Check for changes and Write to repository + run: | + cd Leaf + 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 (Gale)" + git push + else + echo "No changes to commit." + fi From 864d27e3bcb490b085d99b84cdf18f4dd14dd5e1 Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:32:00 +0800 Subject: [PATCH 02/10] Update auto-update.yml --- .github/workflows/auto-update.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 655fee1ba..3360bfb4a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -12,14 +12,14 @@ jobs: with: path: 'Leaf' token: ${{ secrets.GITHUB_TOKEN }} -   + - name: Checkout Gale Repository uses: actions/checkout@v3 with: path: 'Gale' repository: "GaleMC/Gale" token: ${{ secrets.GITHUB_TOKEN }} -   + - name: Get Gale Latest Commit Hash id: galeRef run: | @@ -27,7 +27,7 @@ jobs: cd Gale echo "::set-output name=galeRef::$(git rev-parse HEAD)" cd .. -   + - name: Update galeRef in Leaf  run: | cd Leaf From 65be82d538b54142b3059ca5b189de41b9dc03f5 Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:34:47 +0800 Subject: [PATCH 03/10] Update auto-update.yml --- .github/workflows/auto-update.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 3360bfb4a..04f27330b 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -21,19 +21,19 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Get Gale Latest Commit Hash - id: galeRef + id: galeCommit run: | ls cd Gale - echo "::set-output name=galeRef::$(git rev-parse HEAD)" + echo "::set-output name=galeCommit::$(git rev-parse HEAD)" cd .. - - name: Update galeRef in Leaf  + - name: Update galeCommit in Leaf  run: | cd Leaf - sed -i "s/\(galeRef\s*=\s*\).*/\1$PAPER_REF/" gradle.properties + sed -i "s/\(galeCommit\s*=\s*\).*/\1$PAPER_REF/" gradle.properties env: - PAPER_REF: ${{ steps.galeRef.outputs.galeRef }} + PAPER_REF: ${{ steps.galeCommit.outputs.galeCommit }} - name: Check for changes and Write to repository run: | cd Leaf From c5699f9946f4f38f4aa80612f1e06dca675558e9 Mon Sep 17 00:00:00 2001 From: HaHaWTH Date: Sun, 17 Dec 2023 03:35:08 +0000 Subject: [PATCH 04/10] Updated Upstream (Gale) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1f07d64ba..83a471f5f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.4-R0.1-SNAPSHOT -galeCommit = 78098840227379410ccc610bddafa6a7956c6ddd +galeCommit = 276e903b2688f23b19bdc8d493c0bf87656d2400 org.gradle.caching = true org.gradle.parallel = true From 61b463e3cddc32e11ab3b72af3534564fd8cd6a8 Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:53:25 +0800 Subject: [PATCH 05/10] Update auto-update.yml --- .github/workflows/auto-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 04f27330b..ce2aea3cd 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v3 with: path: 'Gale' - repository: "GaleMC/Gale" + repository: "Dreeam-qwq/Gale" token: ${{ secrets.GITHUB_TOKEN }} - name: Get Gale Latest Commit Hash From 54d2f6663039fc0ecb191963cf37d5df3057e22c Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:55:27 +0800 Subject: [PATCH 06/10] Update auto-update.yml --- .github/workflows/auto-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index ce2aea3cd..101ec1cd1 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -39,8 +39,8 @@ jobs: cd Leaf if ! git diff --quiet; then git add gradle.properties - git config user.name "HaHaWTH" - git config user.email HaHaWTH@users.noreply.github.com + git config --global user.name "Github Actions" + git config --global user.email no-reply@github.com git commit -m "Updated Upstream (Gale)" git push else From ff5c386429f1f517561af3389c8bb412a5639924 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Sun, 17 Dec 2023 03:56:08 +0000 Subject: [PATCH 07/10] Updated Upstream (Gale) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 83a471f5f..3fed9a361 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.4-R0.1-SNAPSHOT -galeCommit = 276e903b2688f23b19bdc8d493c0bf87656d2400 +galeCommit = 07a2ca6b82a3b809d6b89213b0648ef9067858b6 org.gradle.caching = true org.gradle.parallel = true From 30ac99775345178b29e95801c8fe270060b82ada Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:57:43 +0800 Subject: [PATCH 08/10] Update auto-update.yml --- .github/workflows/auto-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 101ec1cd1..6f7dc85ea 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -39,7 +39,7 @@ jobs: cd Leaf if ! git diff --quiet; then git add gradle.properties - git config --global user.name "Github Actions" + git config --global user.name "github-actions" git config --global user.email no-reply@github.com git commit -m "Updated Upstream (Gale)" git push From 805ae5e7317a2d027fd240f46ea808acb2bef7aa Mon Sep 17 00:00:00 2001 From: DGun Otto Date: Sun, 17 Dec 2023 11:58:21 +0800 Subject: [PATCH 09/10] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 3fed9a361..35669fd95 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.4-R0.1-SNAPSHOT -galeCommit = 07a2ca6b82a3b809d6b89213b0648ef9067858b6 +galeCommit = TEST org.gradle.caching = true org.gradle.parallel = true From df1184314e0328c71fd371f911ded60e5f6a27d6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 17 Dec 2023 03:58:39 +0000 Subject: [PATCH 10/10] Updated Upstream (Gale) --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 35669fd95..3fed9a361 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.4-R0.1-SNAPSHOT -galeCommit = TEST +galeCommit = 07a2ca6b82a3b809d6b89213b0648ef9067858b6 org.gradle.caching = true org.gradle.parallel = true