Feat/#24 jwt토큰 생성 및 Spring Security를 활용한 토큰 검증(인가 처리) 구현 완료, access token갱신과 로그아웃 api 구현 완료 #4
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: CI Pipeline | |
| on: | |
| pull_request: | |
| branches: [ dev ] | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Gradle Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: ${{ runner.os }}-gradle- | |
| - name: Grant execute permission to gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build and Test | |
| run: ./gradlew clean build test | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| install: true | |
| - name: Create buildx builder | |
| run: | | |
| docker buildx create --use --name mybuilder | |
| docker buildx inspect --bootstrap | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build & Push Dependency Cache | |
| run: | | |
| docker buildx build \ | |
| --builder mybuilder \ | |
| --platform linux/amd64 \ | |
| --push \ | |
| --file Dockerfile \ | |
| --tag ${{ secrets.DOCKERHUB_USERNAME }}/haru-app:dependency-cache \ | |
| --target dependencies \ | |
| --cache-to type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/haru-app:dependency-cache,mode=max \ | |
| . | |
| - name: Build & Push Final App Image | |
| run: | | |
| docker buildx build \ | |
| --builder mybuilder \ | |
| --platform linux/amd64 \ | |
| --push \ | |
| --file Dockerfile \ | |
| --tag ${{ secrets.DOCKERHUB_USERNAME }}/haru-app:latest \ | |
| --build-arg DEPENDENCY_IMAGE=${{ secrets.DOCKERHUB_USERNAME }}/haru-app:dependency-cache \ | |
| --cache-from type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/haru-app:dependency-cache \ | |
| . |