[refactor] 리뷰 3개 초과 여부 boolean 추가 #416
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| pull_request: | |
| branches: [ "develop", "release" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| working-directory: . | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| # PR 타겟이 develop이면 dev 설정 생성 | |
| - name: Create application-dev.yml (for develop PR) | |
| if: ${{ github.base_ref == 'develop' }} | |
| env: | |
| APPLICATION_DEV_YML: ${{ secrets.APPLICATION_DEV_YML }} | |
| run: | | |
| python3 - <<'PY' | |
| import os, pathlib | |
| p = pathlib.Path("src/main/resources/application-dev.yml") | |
| p.parent.mkdir(parents=True, exist_ok=True) | |
| p.write_text(os.environ["APPLICATION_DEV_YML"], encoding="utf-8") | |
| PY | |
| - name: Create gradle.properties (for develop PR) | |
| if: ${{ github.base_ref == 'develop' }} | |
| env: | |
| GRADLE_DEV_PROPERTIES: ${{ secrets.GRADLE_DEV_PROPERTIES }} | |
| run: | | |
| python3 - <<'PY' | |
| import os, pathlib | |
| p = pathlib.Path("gradle.properties") | |
| p.write_text(os.environ["GRADLE_DEV_PROPERTIES"], encoding="utf-8") | |
| PY | |
| # PR 타겟이 release이면 prod 설정 생성 | |
| - name: Create application-prod.yml (for release PR) | |
| if: ${{ github.base_ref == 'release' }} | |
| env: | |
| APPLICATION_PROD_YML: ${{ secrets.APPLICATION_PROD_YML }} | |
| run: | | |
| python3 - <<'PY' | |
| import os, pathlib | |
| p = pathlib.Path("src/main/resources/application-prod.yml") | |
| p.parent.mkdir(parents=True, exist_ok=True) | |
| p.write_text(os.environ["APPLICATION_PROD_YML"], encoding="utf-8") | |
| PY | |
| - name: Create gradle.properties (for release PR) | |
| if: ${{ github.base_ref == 'release' }} | |
| env: | |
| GRADLE_PROD_PROPERTIES: ${{ secrets.GRADLE_PROD_PROPERTIES }} | |
| run: | | |
| python3 - <<'PY' | |
| import os, pathlib | |
| p = pathlib.Path("gradle.properties") | |
| p.write_text(os.environ["GRADLE_PROD_PROPERTIES"], encoding="utf-8") | |
| PY | |
| - name: Build with Gradle | |
| run: | | |
| chmod +x gradlew | |
| ./gradlew build -x test | |
| shell: bash |