Skip to content

Commit

Permalink
Add code for ECS deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
reachfh committed Sep 12, 2023
1 parent 68c807c commit 2a2a3a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,18 @@ jobs:
# --output text \
# --query '[deploymentId]'

# Deploy using `aws ecs update-service`
# ECR_IMAGE="${{ env.ECR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VAR }}${{ env.IMAGE_VER }}"
# Get current task definition
# TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$TASK_FAMILY" --region "$AWS_DEFAULT_REGION")
# Add new ECR image address to old template and remove unneeded attributes
# NEW_TASK_DEFINTIION=$(echo $TASK_DEFINITION | jq --arg IMAGE "$ECR_IMAGE" '.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities)')
# Register new task definition
# NEW_TASK_INFO=$(aws ecs register-task-definition --region "$AWS_DEFAULT_REGION" --cli-input-json "$NEW_TASK_DEFINTIION")
# Get new revision
# NEW_REVISION=$(echo $NEW_TASK_INFO | jq '.taskDefinition.revision')
# aws ecs update-service --cluster ${ECS_CLUSTER} --service ${SERVICE_NAME} --task-definition ${TASK_FAMILY}:${NEW_REVISION}```

# container-test:
# runs-on: ubuntu-latest
# needs: [build-test]
Expand Down

0 comments on commit 2a2a3a6

Please sign in to comment.