mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Fix auto update upstream workflow
This commit is contained in:
15
.github/workflows/auto-update.yml
vendored
15
.github/workflows/auto-update.yml
vendored
@@ -25,16 +25,15 @@ jobs:
|
||||
- name: Get Gale latest commit Hash
|
||||
id: galeCommit
|
||||
run: |
|
||||
ls
|
||||
cd Gale
|
||||
echo "::set-output name=galeCommit::$(git rev-parse HEAD)"
|
||||
cd ..
|
||||
echo "galeCommit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get Leaf Current Gale commit Hash
|
||||
id: curGaleRef
|
||||
id: currGaleRef
|
||||
run: |
|
||||
cd Leaf
|
||||
grep "^galeCommit\s*=" gradle.properties | sed 's/^galeCommit\s*=\s*//'
|
||||
currGaleRef=$(grep "^galeCommit\s*=" gradle.properties | sed 's/^galeCommit\s*=\s*//')
|
||||
echo "currGaleRef=$currGaleRef" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update galeCommit in Leaf
|
||||
run: |
|
||||
@@ -45,9 +44,9 @@ jobs:
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: |
|
||||
cd Leaf
|
||||
git config --global user.name "Dreeam"
|
||||
git config --global user.email 61569423+Dreeam-qwq@users.noreply.github.com
|
||||
cd Leaf
|
||||
chmod +x gradlew
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
@@ -72,10 +71,10 @@ jobs:
|
||||
echo "Writing to repo....."
|
||||
git add .
|
||||
chmod +x ./scripts/upstreamCommit.sh
|
||||
./scripts/upstreamCommit.sh --gale $CUR_GALE_REF
|
||||
./scripts/upstreamCommit.sh --gale $CURR_GALE_REF
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit."
|
||||
fi
|
||||
env:
|
||||
CUR_GALE_REF: ${{ steps.curGaleRef.outputs.curGaleRef }}
|
||||
CURR_GALE_REF: ${{ steps.currGaleRef.outputs.currGaleRef }}
|
||||
|
||||
Reference in New Issue
Block a user