mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 03:22:47 +01:00
ci: do not check --ff-only
on master branch
This commit is contained in:
parent
779e4295ad
commit
dcc1ff37bc
22
.github/workflows/merge-check.yml
vendored
22
.github/workflows/merge-check.yml
vendored
@ -25,16 +25,20 @@ jobs:
|
||||
|
||||
- name: Check merge --ff-only
|
||||
run: |
|
||||
git fetch origin master:master
|
||||
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then
|
||||
git fetch origin ${{ github.event.pull_request.base.ref }}:base_branch
|
||||
git checkout base_branch
|
||||
git pull --rebase=false origin pull/${{ github.event.pull_request.number }}/head
|
||||
git checkout master
|
||||
git merge --ff-only base_branch
|
||||
if [[ "${{ github.ref_name }}" == "master" ]]; then
|
||||
echo "Already on master, no need to check --ff-only"
|
||||
else
|
||||
git checkout master
|
||||
git merge --ff-only ${{ github.sha }}
|
||||
git fetch origin master:master
|
||||
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then
|
||||
git fetch origin ${{ github.event.pull_request.base.ref }}:base_branch
|
||||
git checkout base_branch
|
||||
git pull --rebase=false 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
|
||||
fi
|
||||
|
||||
- name: add labels
|
||||
|
Loading…
Reference in New Issue
Block a user