9
0
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:
Dreeam
2024-07-18 02:58:20 +08:00
parent 2e7126fd3f
commit 545d645c3d

View File

@@ -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 }}