-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from SWM-NM/dev
🐛 [FIX] 단계 삭제 및 docker build 코드 변경 #220
- Loading branch information
Showing
1 changed file
with
9 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,11 +39,6 @@ jobs: | |
- name: Build with Gradle | ||
run: ./gradlew clean bootJar -x test | ||
|
||
aws-deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
|
@@ -52,22 +47,18 @@ jobs: | |
aws-region: ${{ env.AWS_REGION }} | ||
mask-aws-account-id: true # AWS 계정 ID를 마스킹하여 보안 강화 | ||
|
||
- name: Login to ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
- name: Login to Public ECR | ||
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/s7z8j0e6 | ||
|
||
- name: Build and Push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{env.GITHUB_SHA}} | ||
- name: Build Docker Image | ||
run: docker build -t morandi-backend . | ||
|
||
ec2-deploy: | ||
runs-on: ubuntu-latest | ||
needs: aws-deploy | ||
- name: Tag Docker Image | ||
run: docker tag morandi-backend:latest public.ecr.aws/s7z8j0e6/morandi-backend:latest | ||
|
||
- name: Push Docker Image to ECR | ||
run: docker push public.ecr.aws/s7z8j0e6/morandi-backend:latest | ||
|
||
steps: | ||
- name: appleboy SSH and Deploy to EC2 | ||
uses: appleboy/[email protected] # ssh 접속하는 오픈소스 | ||
with: | ||
|