Update AuthController.java #282
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: Java CI & Docker Build | |
| on: | |
| push: | |
| branches: [ "dev", "kakao" ] | |
| pull_request: | |
| branches: [ "dev", "kakao" ] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1) 소스 코드 + 서브모듈 체크아웃 | |
| - name: Checkout source & submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| token: ${{ secrets.ACTION_TOKEN }} | |
| # 2) gradlew 실행 권한 부여 | |
| - name: Grant execute permission to gradlew | |
| run: chmod +x gradlew | |
| # 3) JDK 21 설치 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| # 4) Gradle 캐싱 및 설정 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # 5) 애플리케이션 빌드 (dev 프로파일) | |
| - name: Build with Gradle | |
| run: ./gradlew clean bootJar --no-daemon -Dspring.profiles.active=dev | |
| # 6) 테스트 결과 리포트 | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: success() || failure() | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| # 7) QEMU (멀티아키 에뮬) | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| # 8) Buildx (멀티아키 빌더) | |
| - name: Setup Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker-container | |
| # 9) GHCR 로그인 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.ACTION_TOKEN }} | |
| # 10) 이미지 메타데이터 (★ 전부 소문자 경로 + sha 짧은 형태) | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/lets-gu/backend | |
| tags: | | |
| type=sha,format=short | |
| # 11) 멀티아키 빌드 & 푸시 (amd64 + arm64) | |
| - name: Build and Push Docker image (multi-arch) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |