Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JuseungL committed Nov 26, 2024
1 parent 10da7e7 commit 3653da0
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,8 @@ on:
- main
env:
AWS_REGION: ${{ secrets.AWS_REGION }}

ECR_REPOSITORY: ${{ secrets.ECR_REPOSITORY }}

ECS_CLUSTER: ${{ secrets.ECS_CLUSTER }}
ECS_SERVICE: ${{ secrets.ECS_SERVICE }}
ECS_TASK_DEFINITION: ${{ secrets.ECS_TASK_DEFINITION }}
CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }}

CODEDEPLOY_APPLICATION: ${{ secrets.CODEDEPLOY_APPLICATION }}
CODEDEPLOY_DEPLOYMENT_GROUP: ${{ secrets.CODEDEPLOY_DEPLOYMENT_GROUP }}

jobs:
build:
Expand Down Expand Up @@ -81,22 +73,22 @@ jobs:
run: |
aws ecs describe-task-definition --task-definition ${{ env.ECS_TASK_DEFINITION }} --query taskDefinition > task-definition.json
# Fill in the new image ID in the Amazon ECS task definition (v3)
# Fill in the new image ID in the Amazon ECS task definition
- name: Fill in the new image ID in the ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v3
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: ${{ env.CONTAINER_NAME }}
container-name: ${{ secrets.CONTAINER_NAME }}
image: ${{ env.IMAGE }}

# Deploy the updated ECS task definition (v3)
# Deploy the updated ECS task definition
- name: Deploy ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v3
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
service: ${{ secrets.ECS_SERVICE }}
cluster: ${{ secrets.ECS_CLUSTER }}
codedeploy-appspec: appspec.yml
codedeploy-application: ${{ env.CODEDEPLOY_APPLICATION }}
codedeploy-deployment-group: ${{ env.CODEDEPLOY_DEPLOYMENT_GROUP }}
codedeploy-application: ${{ secrets.CODEDEPLOY_APPLICATION }}
codedeploy-deployment-group: ${{ secrets.CODEDEPLOY_DEPLOYMENT_GROUP }}

0 comments on commit 3653da0

Please sign in to comment.