Skip to content

Commit bcce0ce

Browse files
committed
Use pull to update target branch in Automerge Workflow (#180)
This updates the Automerge Workflow to use a `git pull --unshallow` command instead of `git fetch --unshallow` to obtain the history of the target branch. Using `git pull` ensures the worktree contents will also be correctly up-to-date if any new changes are added to the remote between the 'Checkout' step and the 'Fetch Branches' step.
1 parent d2b29b8 commit bcce0ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
git remote set-branches --add origin ${{ matrix.branches.from_branch }}
3939
git fetch origin ${{ matrix.branches.from_branch }}:${{ matrix.branches.from_branch }}
40-
git fetch origin --update-head-ok --unshallow ${{ matrix.branches.to_branch }}:${{ matrix.branches.to_branch }}
40+
git pull --unshallow --ff-only origin ${{ matrix.branches.to_branch }}
4141
- name: Run automerge
4242
run: python3 arm-software/ci/automerge.py --project-name ${{ github.repository }} --from-branch ${{ matrix.branches.from_branch }} --to-branch ${{ matrix.branches.to_branch }} --verbose
4343
env:

0 commit comments

Comments
 (0)