Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the branch names in restrict-branch-merge.yml #37

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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