diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76db94f..3cc21a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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]