Skip to content

Commit

Permalink
Added check_merge_conflict step
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-abblix committed Jul 10, 2024
1 parent 7efcb22 commit 43e41c1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ on:
workflow_dispatch: # Manual trigger

jobs:
check_merge_conflict:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0 # Fetch all history to avoid shallow clone issues
- name: Checkout release branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow
path: release_branch
- name: Check for merge conflicts
run: |
git fetch origin master
git checkout master
git merge --no-commit --no-ff release_branch || (
echo "Merge to master conflict detected. Aborting."
git merge --abort
exit 1
)
get_version:
runs-on: ubuntu-latest
outputs:
Expand Down

0 comments on commit 43e41c1

Please sign in to comment.