Skip to content

Commit

Permalink
Update deployment.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dudgns3443 authored Dec 12, 2024
1 parent 5ba9f96 commit 7deb4eb
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
# AWS_REGION: ap-northeast-2
AWS_REGION: us-east-1
ECR_URL: 534420079206.dkr.ecr.us-east-1.amazonaws.com/cicd-test:latest
ECS_CLUSTER_NAME: cicd-test
ECS_SERVICE_NAME: cicd-test
ECS_TASK_DEFI: cicd-test-definition:1

jobs:
CI:
Expand Down Expand Up @@ -50,17 +53,17 @@ jobs:

- name: Container Push
run : docker push ${{ env.ECR_URL }}
# CD:
# name: Deploy
# runs-on: ubuntu-latest
# needs: CI
# steps:
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v2
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: ${{ env.AWS_REGION }}
CD:
name: Deploy
runs-on: ubuntu-latest
needs: CI
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

# - name: Deploy to ECS
# run: aws ecs update-service --cluster cicd-test --service cicd-test --task-definition first-run-task-definition:7 --force-new-deployment
- name: Deploy to ECS
run: aws ecs update-service --cluster {{env.ECS_CLUSTER_NAME}} --service {{env.ECS_SERVICE_NAME}} --task-definition {{ECS_TASK_DEFI}} --force-new-deployment

0 comments on commit 7deb4eb

Please sign in to comment.