mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 23:19:18 +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
|
- name: Get Gale latest commit Hash
|
||||||
id: galeCommit
|
id: galeCommit
|
||||||
run: |
|
run: |
|
||||||
ls
|
|
||||||
cd Gale
|
cd Gale
|
||||||
echo "::set-output name=galeCommit::$(git rev-parse HEAD)"
|
echo "galeCommit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Get Leaf Current Gale commit Hash
|
- name: Get Leaf Current Gale commit Hash
|
||||||
id: curGaleRef
|
id: currGaleRef
|
||||||
run: |
|
run: |
|
||||||
cd Leaf
|
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
|
- name: Update galeCommit in Leaf
|
||||||
run: |
|
run: |
|
||||||
@@ -45,9 +44,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: |
|
run: |
|
||||||
|
cd Leaf
|
||||||
git config --global user.name "Dreeam"
|
git config --global user.name "Dreeam"
|
||||||
git config --global user.email 61569423+Dreeam-qwq@users.noreply.github.com
|
git config --global user.email 61569423+Dreeam-qwq@users.noreply.github.com
|
||||||
cd Leaf
|
|
||||||
chmod +x gradlew
|
chmod +x gradlew
|
||||||
|
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
@@ -72,10 +71,10 @@ jobs:
|
|||||||
echo "Writing to repo....."
|
echo "Writing to repo....."
|
||||||
git add .
|
git add .
|
||||||
chmod +x ./scripts/upstreamCommit.sh
|
chmod +x ./scripts/upstreamCommit.sh
|
||||||
./scripts/upstreamCommit.sh --gale $CUR_GALE_REF
|
./scripts/upstreamCommit.sh --gale $CURR_GALE_REF
|
||||||
git push
|
git push
|
||||||
else
|
else
|
||||||
echo "No changes to commit."
|
echo "No changes to commit."
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
CUR_GALE_REF: ${{ steps.curGaleRef.outputs.curGaleRef }}
|
CURR_GALE_REF: ${{ steps.currGaleRef.outputs.currGaleRef }}
|
||||||
|
|||||||
Reference in New Issue
Block a user