mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-25 09:59:15 +00:00
[ci skip] Fix auto update
This commit is contained in:
19
.github/workflows/auto-update.yml
vendored
19
.github/workflows/auto-update.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user