Merge #6486: ci: do not check --ff-only on master branch

dcc1ff37bc ci: do not check `--ff-only` on master branch (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  https://github.com/dashpay/dash/actions/runs/12303817802/job/34340079798

  It makes no sense to check it anyway.

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK dcc1ff37bc

Tree-SHA512: bcff6ff7bcb70f2d48e9df7db2a76b65b386f0cc7f213e44dc13a44416e1cab9449c1344166ac58e8e577dcfbdc22b0b4ebb93d610b0790623188c1680804b69
This commit is contained in:
pasta 2024-12-14 13:06:19 -06:00
commit 4a63d64340
No known key found for this signature in database
GPG Key ID: 5255B86F912A614A

View File

@ -25,16 +25,20 @@ jobs:
- name: Check merge --ff-only - name: Check merge --ff-only
run: | run: |
git fetch origin master:master if [[ "${{ github.ref_name }}" == "master" ]]; then
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then echo "Already on master, no need to check --ff-only"
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 else
git checkout master git fetch origin master:master
git merge --ff-only ${{ github.sha }} 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 fi
- name: add labels - name: add labels