From 545d645c3d6b65450b940227e4e37e562716aa6e Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Thu, 18 Jul 2024 02:58:20 +0800 Subject: [PATCH] Fix auto update upstream workflow --- .github/workflows/auto-update.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index a196832d..a78827f9 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -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 }}