aws-actions / amazon-ecs-deploy-task-definition

Registers an Amazon ECS task definition and deploys it to an ECS service.
MIT License
625 stars 229 forks source link

Is it possible to register a task definition without deploying the service? #533

Closed geovanygameros closed 6 months ago

geovanygameros commented 6 months ago

I would like to have more control over deployments to production environments and just use GitHub actions to push a new image to ECR and register a new task definition using that image.

I think an option just to register the task definition could be useful in case we want to have it ready on ECS but not deploy it right away.

A param like only-register could be very handy in this situation.

- name: Deploy to Amazon ECS
  uses: aws-actions/amazon-ecs-deploy-task-definition@v1
  with:
    task-definition: task-definition.json
    service: my-service
    cluster: my-cluster
    only-register: true
geovanygameros commented 6 months ago

After digging into the actions.yml file I found that if the service param is not provided, the action will only register the task definition.

I'm closing this since the functionality is already available, this could be included in the README though. 😄