From c541a376598361bbe66f17eff7ca78a90a2828d9 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Fri, 18 Apr 2025 16:13:06 +0800 Subject: [PATCH] feat(GHA): Renovate auto rebase after PR automerge enabled --- .github/workflows/renovate-rebase.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/renovate-rebase.yaml b/.github/workflows/renovate-rebase.yaml index 91d1044c..484464e6 100644 --- a/.github/workflows/renovate-rebase.yaml +++ b/.github/workflows/renovate-rebase.yaml @@ -53,6 +53,7 @@ jobs: git remote add upstream https://github.com/${{ github.event.pull_request.base.repo.full_name }} git pull --no-edit upstream ${{ github.event.pull_request.base.ref }} git reset --soft ${{ github.event.pull_request.head.sha }} # so the rev-parse in API commit gets the right SHA + git restore --staged . - name: Commit Changes env: @@ -63,7 +64,8 @@ jobs: export TODAY=$( date -u '+%Y-%m-%d_%H-%M-%S' ) export MESSAGE="chore: update ${{ github.event.pull_request.head.ref }} $TODAY" echo "Branch to update: $DESTINATION_BRANCH" - for FILE_TO_COMMIT in $(git diff ${{ github.event.pull_request.head.sha }} HEAD --name-only || git diff --name-only --staged || git diff --name-only); + # for FILE_TO_COMMIT in $(git diff ${{ github.event.pull_request.head.sha }} HEAD --name-only || git diff --name-only --staged || git diff --name-only); + for FILE_TO_COMMIT in $(git diff --name-only); do export SHA=$( git rev-parse $DESTINATION_BRANCH:$FILE_TO_COMMIT ) export CONTENT=$( base64 -i $FILE_TO_COMMIT )