From 2f7a2fd1dc3211b2437a28fd92782a87eda0075b Mon Sep 17 00:00:00 2001 From: pywoo Date: Mon, 7 Jul 2025 19:33:54 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20ci:=20PR=20=EB=8B=A8?= =?UTF-8?q?=EA=B3=84=EC=97=90=EC=84=9C=20=EB=B3=91=ED=95=A9=20=EB=B0=8F=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev_integrate.yml | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/dev_integrate.yml diff --git a/.github/workflows/dev_integrate.yml b/.github/workflows/dev_integrate.yml new file mode 100644 index 0000000..661978b --- /dev/null +++ b/.github/workflows/dev_integrate.yml @@ -0,0 +1,48 @@ +name: CI Pipeline + +on: + pull_request: + branches: + - develop # develop 브랜치로 PR이 올라온 경우로 제한 + types: [opened, synchronize, reopened] + +jobs: + pr_merge_and_build: + runs-on: ubuntu-latest + steps: + - name: Set Git identity + run: | + git config --global user.email "ci@example.com" + git config --global user.name "CI Runner" + + # PR 브랜치 체크아웃 + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + # Java 환경설정 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + + # Gradle 권한부여 + - name: Grant execute permission fom gradlew + run: chmod +x gradlew + + # 현재 브랜치만 빌드 테스트 + - name: Build jar + run: ./gradlew clean compileJava -x test + + # 현재 브랜치 + develop 병합 테스트 + - name: Test merge with develop branch + run: | + git fetch origin main + git merge origin/main --no-commit --no-ff || { echo "현재 브랜치는 develop 브랜치와 병합시 conflict가 발생합니다."; exit 1; } + + # 병합 후 최종 빌드 테스트 + - name: Build jar + run: ./gradlew clean compileJava -x test \ No newline at end of file