Merge pull request #852 from linkwarden/dev

created check-branch.yml
This commit is contained in:
Daniel 2024-11-14 02:43:50 -05:00 committed by GitHub
commit c8efd4f9db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

18
.github/workflows/check-branch.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Check pull request source branch
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
- edited
jobs:
check-branches:
runs-on: ubuntu-latest
steps:
- name: Check branches
run: |
if [ ${{ github.head_ref }} != "dev" ] && [ ${{ github.base_ref }} == "main" ]; then
echo "Merge requests to main branch are only allowed from dev branch. Please rebase your changes to dev branch."
exit 1
fi