mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
ci: check ff after merge into base branch for PRs
This commit is contained in:
parent
aaccc9ea51
commit
c76e398caa
9
.github/workflows/merge-check.yml
vendored
9
.github/workflows/merge-check.yml
vendored
@ -26,11 +26,14 @@ jobs:
|
||||
- name: Check merge --ff-only
|
||||
run: |
|
||||
git fetch origin master:master
|
||||
git checkout master
|
||||
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then
|
||||
git fetch origin pull/${{ github.event.pull_request.number }}/head
|
||||
git merge --ff-only ${{ github.event.pull_request.head.sha }}
|
||||
git fetch origin {{ github.event.pull_request.base.ref }}:base_branch
|
||||
git checkout base_branch
|
||||
git pull origin pull/${{ github.event.pull_request.number }}/head
|
||||
git checkout master
|
||||
git merge --ff-only base_branch
|
||||
else
|
||||
git checkout master
|
||||
git merge --ff-only ${{ github.sha }}
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user