[Refactor/53] Controller 인터페이스 추가 및 코드 컨벤션 적용 #89
Workflow file for this run
This file contains 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/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 |