Skip to content

Commit

Permalink
Fix auto update upstream workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jul 17, 2024
1 parent 2e7126f commit 545d645
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit 545d645

Please sign in to comment.