Skip to content

Commit

Permalink
[SWM-296] Feat : add ecs task definition in deploy file
Browse files Browse the repository at this point in the history
  • Loading branch information
D-w-nJ committed Sep 16, 2023
1 parent b1b28ef commit 2d2787f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,21 @@ jobs:
run: |
docker build -t be-repo .
docker tag be-repo 224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo
docker push 224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo
docker push 224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo
echo "::set-output name=image::224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo"
## ECS task 정의
- name: Push the image ID in the ECS task definition
id: task-def
uses: aws-actions/amazon-ecr-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: be-container
image: ${{ steps.build-image.outputs.image }}
## ECS 실행
- name: Deploy ECS task definition
uses: aws-actions/amazon-ecr-render-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: sroom-service
cluster: sroom
wait-for-service-stability: true
6 changes: 3 additions & 3 deletions task-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"memoryReservation": 500,
"volumesFrom": [],
"stopTimeout": null,
"image": "224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/sroom-repo:2023-09-16T18-52-43",
"image": "224066583965.dkr.ecr.ap-northeast-2.amazonaws.com/be-repo:latest",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
Expand All @@ -64,7 +64,7 @@
"EXTERNAL",
"EC2"
],
"taskDefinitionArn": "arn:aws:ecs:ap-northeast-2:224066583965:task-definition/be-task:2",
"taskDefinitionArn": "arn:aws:ecs:ap-northeast-2:224066583965:task-definition/be-task:3",
"family": "be-task",
"requiresAttributes": [
{
Expand Down Expand Up @@ -117,7 +117,7 @@
"networkMode": "bridge",
"runtimePlatform": null,
"cpu": null,
"revision": 2,
"revision": 3,
"status": "ACTIVE",
"inferenceAccelerators": null,
"proxyConfiguration": null,
Expand Down

0 comments on commit 2d2787f

Please sign in to comment.