Skip to content

Commit 0d0a3f4

Browse files
authored
Merge pull request #57 from devwqc/refactor/main-pr-only-develop
[refactor] main으로 PR은 develop에서만 가능하게 변경
2 parents ca6b2a2 + fe6d43f commit 0d0a3f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ name: Build Test
33
on:
44
pull_request:
55
branches: [main, develop]
6+
types: [opened, synchronize, reopened, edited]
67
workflow_dispatch:
78

89
jobs:
910
build-test:
1011
runs-on: ubuntu-latest
1112
steps:
13+
- name: Check source branch for main PR
14+
if: github.base_ref == 'main' && github.head_ref != 'develop'
15+
run: |
16+
echo "PRs to main branch are only allowed from develop branch"
17+
exit 1
18+
1219
- name: Checkout your repository using git
1320
uses: actions/checkout@v4
1421
- name: Install, build, and upload your site

0 commit comments

Comments
 (0)