Skip to content

CodeDeploy with variable AppSpec file #741

Open
@anshgandhi

Description

@anshgandhi

Hello, I am trying to achieve the following functionality using this GH Actions.

aws deploy create-deployment --cli-input-yaml file://some-app-spec-file-1.yaml

I tried the following steps:

- name: render ecs task definition
  id: task-def
  uses: aws-actions/amazon-ecs-render-task-definition@v1
  with:
    task-definition-arn: ${{vars.TASK_DEF_ARN}}
    container-name: some-container
    image: ${{ vars.ECR_REPOSITORY_URI }}/${{ vars.ECR_REPOSITORY_NAME }}:${{ vars.IMAGE_TAG }}

- name: register ecs task definition
  uses: aws-actions/amazon-ecs-deploy-task-definition@v2
  with:
    task-definition: ${{ steps.task-def.outputs.task-definition }}
    codedeploy-appspec: ${{ vars.AWS_CODE_DEPLOY_SPEC_FILE }} # some-app-spec-file-1.yaml

some-app-spec-file-1.yaml has the applicationName, deploymentGroupName already defined. I have different app-spec (some-app-spec-file-2.yaml) files that I want to be able to run using the same GH Action.

This does register the new Task Definition but doesn't create a deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions