/github-action-aws-codedeploy-wait

Simple action to wait for an AWS CodeDeploy job to be in a desired state.

Apache License 2.0Apache-2.0

Geek Cell GmbH

Description

Wait for an AWS CodeDeploy deployment to finish. Will poll the CodeDeploy API until the deployment is finished or failed.

Usage

Advanced Example

## Create new CodeDeploy deployment
- name: Deploy Amazon ECS
  id: deploy-ecs
  uses: aws-actions/amazon-ecs-deploy-task-definition@v1
  with:
    cluster: my-cluster
    service: my-service
    task-definition: task-definition.yaml

    codedeploy-appspec: appspec.yaml
    codedeploy-application: my-application
    codedeploy-deployment-group: my-deployment-group

## Wait for ECS Blue Deployment
- name: Wait for blue instances to be ready
  uses: geekcell/github-action-aws-codedeploy-wait@v1.0.0
  with:
    codedeploy-deployment-id: steps.deploy-ecs.outputs.codedeploy-deployment-id

## Run smoke tests
- name: Run tests
  run: yarn cypress run

## Shift traffic if tests passed
- name: Shift Traffic
  run: aws deploy continue-deployment --deployment-id ${{ needs.deployment.outputs.codedeploy-deployment-id }}

Inputs

parameter description required default
codedeploy-deployment-id The ID of the CodeDeploy deployment to check. true
sleep-between-requests How many seconds to sleep between requests to the CodeDeploy API to check the status. false 5

Runs

This action is a composite action.