mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
Fix workflow (#15)
* Create auto-update.yml * Update auto-update.yml * Update auto-update.yml * Updated Upstream (Gale) * Update auto-update.yml * Update auto-update.yml * Updated Upstream (Gale) * Update auto-update.yml * Update gradle.properties * Updated Upstream (Gale) * test * Updated Upstream (Gale) * Update auto-update.yml * test * Updated Upstream (Gale) * Update auto-update.yml * test * Update auto-update.yml * Update auto-update.yml * Update auto-update.yml * Updated Upstream (Gale) * Update auto-update.yml * Update auto-update.yml * Update auto-update.yml * Update auto-update.yml * Update auto-update.yml * Update gradle.properties --------- Co-authored-by: HaHaWTH <HaHaWTH@users.noreply.github.com> Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
This commit is contained in:
20
.github/workflows/auto-update.yml
vendored
20
.github/workflows/auto-update.yml
vendored
@@ -1,8 +1,10 @@
|
||||
name: Automatically update Gale commit hash
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -34,10 +36,26 @@ jobs:
|
||||
sed -i "s/\(galeCommit\s*=\s*\).*/\1$PAPER_REF/" gradle.properties
|
||||
env:
|
||||
PAPER_REF: ${{ steps.galeCommit.outputs.galeCommit }}
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: |
|
||||
cd Leaf
|
||||
chmod +x gradlew
|
||||
|
||||
- name: Running tests before push
|
||||
run: |
|
||||
cd Leaf
|
||||
if ! git diff --quiet; then
|
||||
echo "Running tests...."
|
||||
./gradlew applyPatches
|
||||
./gradlew createReobfPaperclipJar
|
||||
fi
|
||||
|
||||
- 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
|
||||
@@ -45,4 +63,4 @@ jobs:
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit."
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user