Skip to content

Commit

Permalink
added gh workflow (#17)
Browse files Browse the repository at this point in the history
* added gh workflow

* added co-owner
  • Loading branch information
injas427 authored Nov 17, 2024
1 parent 751c97e commit 10fdeb2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@injas427
19 changes: 19 additions & 0 deletions .github/workflows/restrict-merges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Enforce Merge Source Branch

on:
pull_request:
branches:
- main # Replace with your protected branch name

jobs:
restrict-source-branch:
runs-on: ubuntu-latest

steps:
- name: Check source branch
run: |
if [[ "${{ github.base_ref }}" != "main" || "${{ github.head_ref }}" != "develop" ]]; then
echo "Pull requests to main must originate from develop."
exit 1
fi
shell: bash

0 comments on commit 10fdeb2

Please sign in to comment.