Skip to content

[Feature/70] API Endpoint 수정 및 할 일 등록 API 수정 #101

[Feature/70] API Endpoint 수정 및 할 일 등록 API 수정

[Feature/70] API Endpoint 수정 및 할 일 등록 API 수정 #101

Workflow file for this run

name: CI/CD-For-Timify
on:
pull_request:
types: [ closed ]
workflow_dispatch: # (2).수동 실행도 가능하도록
jobs:
my-action:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'develop'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Set Environment
uses: microsoft/variable-substitution@v1
with:
files: ./src/main/resources/application.yml
env:
spring.datasource.url: jdbc:mysql://${{ secrets.DB_URL }}
spring.datasource.username: ${{ secrets.DB_USERNAME }}
spring.datasource.password: ${{ secrets.DB_PASSWORD }}
spring.data.redis.host: ${{ secrets.REDIS_HOST }}
spring.data.redis.password: ""
jwt.secret: ${{ secrets.JWT_SECRET }}
social.kakao.apikey: ${{ secrets.KAKAO_API_KEY }}
social.kakao.redirect_uri: ${{ secrets.KAKAO_REDIRECT_URI }}
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
shell: bash
- name: Build with Gradle
run: ./gradlew clean build
shell: bash
- name: Generate current time
id: current-time
run: echo "formattedTime=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cp Procfile deploy/
cp -r .ebextensions deploy/
cp -r .platform deploy/
cd deploy && zip -r deploy.zip .
shell: bash
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v14
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: timify-springboot-application
environment_name: Timify-springboot-application-env
version_label: Github Action-${{ env.formattedTime }}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_deployment: false