[chore] 테스트용 RequestBody 로그 출력 #41
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: Reservation Service CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
- "reservation-service/**" | |
pull_request: | |
branches: | |
- main | |
- develop | |
paths: | |
- "reservation-service/**" | |
env: | |
S3_BUCKET_NAME: ssafy-otd-codedeploy | |
AWS_REGION: ap-northeast-2 | |
CODEDEPLOY_NAME: ssafy-otd-codedeploy | |
CODEDEPLOY_GROUP: ssafy-otd-reservation-service-group | |
TARGET_PROJECT: reservation-service | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./${{ env.TARGET_PROJECT }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Grant Permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build -x test | |
- name: Make zip file | |
run: zip -r ./$GITHUB_SHA.zip . | |
- name: Configure AWS credential | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: ${{ env.AWS_REGION }} | |
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }} | |
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }} | |
- name: Upload to S3 | |
run: aws s3 cp --region $AWS_REGION ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$TARGET_PROJECT/$GITHUB_SHA.zip | |
- name: Code Deploy | |
run: | | |
aws deploy create-deployment \ | |
--application-name $CODEDEPLOY_NAME \ | |
--deployment-config-name CodeDeployDefault.AllAtOnce \ | |
--deployment-group-name $CODEDEPLOY_GROUP \ | |
--s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$TARGET_PROJECT/$GITHUB_SHA.zip |