Skip to content

Commit 3cab3df

Browse files
authored
Create fork_branch_checker.yml
1 parent adb424f commit 3cab3df

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Fork branch checker
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
types: [ opened, synchronize, reopened ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check fork branch
14+
if: github.event.pull_request.head.repo.full_name != github.repository && github.ref_name == 'main'
15+
uses: actions/github-script@v3
16+
with:
17+
script: |
18+
core.setFailed('Your branch is main and it should be different')

0 commit comments

Comments
 (0)