Refactor authentication to use Redis sessions and PASETO, add Apple OAuth #53
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: Development Deploy to AWS Elastic Beanstalk | |
| # 배포 트리거 조건 | |
| on: | |
| pull_request: | |
| branches: | |
| - develop # dev 브랜치에 PR이 발생했을 때 | |
| types: | |
| - closed # PR이 머지 되었을 때 | |
| workflow_dispatch: # 수동으로 실행할 때 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: dev # Github Actions Evironment 설정, 키 분리를 위한 설정 | |
| steps: # build 작업 내 실행 단계 | |
| - name: Checkout | |
| uses: actions/checkout@v3 # 현재 레포지토리 코드 체크 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v3 # JDK 설정 | |
| with: | |
| java-version: 21 | |
| distribution: zulu | |
| - name: Make application.yml | |
| run: | | |
| mkdir -p ./src/main/resources | |
| cd ./src/main/resources | |
| touch ./application.yml | |
| echo "${{ secrets.APPLICATION_YML_DEV }}" >> ./application.yml | |
| shell: bash | |
| - name: Docker Login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{secrets.DOCKER_HUB_USERNAME}} | |
| password: ${{secrets.DOCKER_HUB_PASSWORD}} | |
| - name: Grant execute permission for gradlew # Gradle 실행을 위한 권한 부여 | |
| run: chmod +x ./gradlew | |
| - name: Cache Jib layers # 🧱 캐시 추가 | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/jib | |
| build/jib-cache | |
| key: ${{ runner.os }}-jib-${{ github.job }}-${{ hashFiles('**/build.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-jib-${{ github.job }}- | |
| - name: Push Docker Image to Docker Hub | |
| run: ./gradlew jib -Pdev | |
| - name: Get current time # 현재 시간 가져오기 | |
| uses: 1466587594/get-current-time@v2 | |
| id: current-time | |
| with: | |
| format: YYYY-MM-DDTHH-mm-ss | |
| utcOffset: "+09:00" # 한국 시간으로 설정 UTC + 9시간 | |
| - name: Show Current Time | |
| run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | |
| - name: Deploy to Elastic Beanstalk | |
| uses: einaregilsson/beanstalk-deploy@v21 | |
| with: | |
| aws_access_key: ${{ secrets.AWS_ACCESS_KEY }} # AWS Access Key Environment(dev)의 Secret에 설정된 값 | |
| aws_secret_key: ${{ secrets.AWS_SECRET_KEY }} # AWS Secret Key Environment(dev)의 Secret에 설정된 값 | |
| application_name: juulabel-backend-dev # Elastic Beanstalk 애플리케이션 이름 | |
| environment_name: Juulabel-backend-dev-env # Elastic Beanstalk 환경 이름 | |
| version_label: juulabel-backend-dev-${{steps.current-time.outputs.formattedTime}} | |
| region: ap-northeast-2 | |
| deployment_package: docker-compose-dev-deploy.yml | |
| wait_for_environment_recovery: 300 |