Feature/2 pre commit setting #9
Workflow file for this run
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: Spring Build Check | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ main, develop, release/*, hotfix/* ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/*.kts', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build --no-daemon | |
| - name: Upload build reports | |
| if: always() | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: build-reports | |
| path: | | |
| **/build/reports/ | |
| **/build/test-results/ | |
| retention-days: 7 | |
| - name: Fail if build failed | |
| if: failure() | |
| run: | | |
| echo "빌드에 실패했습니다. 로컬에서 오류를 수정한 후 다시 시도하세요." | |
| exit 1 |