Skip to content

Commit

Permalink
Fix the branch names in restrict-branch-merge.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gSrikar authored Sep 23, 2024
1 parent f5a1ed8 commit ce56750
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/restrict-branch-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Enforce Branch Merge Rules"
on:
pull_request:
branches:
- master
- main
- release

jobs:
Expand All @@ -17,8 +17,8 @@ jobs:
echo "Only the develop branch can be merged into the release branch."
exit 1
- name: Enforce release/hotfix -> master
if: github.ref == 'refs/heads/master' && github.head_ref != 'release' && github.head_ref != 'hotfix'
- name: Enforce release/hotfix -> main
if: github.ref == 'refs/heads/main' && github.head_ref != 'release' && github.head_ref != 'hotfix'
run: |
echo "Only the release or hotfix branch can be merged into the master branch."
echo "Only the release or hotfix branch can be merged into the main branch."
exit 1

0 comments on commit ce56750

Please sign in to comment.