File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,21 @@ jobs:
6464 echo "::set-output name=branch::$BRANCH"
6565 fi
6666 shell : bash
67-
67+
68+ - name : Pull remote changes
69+ env :
70+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71+ run : |
72+ # Ensure the local branch is up-to-date with the remote.
73+ TARGET_BRANCH="${{ steps.branch.outputs.branch }}"
74+ echo "Pulling latest changes from branch: $TARGET_BRANCH"
75+ git pull --rebase origin "$TARGET_BRANCH"
76+
6877 - name : Push changes
6978 env :
7079 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7180 run : |
81+ # Push the updated branch with the revert commit.
7282 TARGET_BRANCH="${{ steps.branch.outputs.branch }}"
7383 echo "Pushing changes to branch: $TARGET_BRANCH"
7484 git push origin HEAD:"$TARGET_BRANCH"
You can’t perform that action at this time.
0 commit comments