We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adb424f commit 3cab3dfCopy full SHA for 3cab3df
.github/workflows/fork_branch_checker.yml
@@ -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