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

Inserts a container image URI into an Amazon ECS task definition JSON file.
MIT License
282 stars 144 forks source link

current status #252

Open bmbferreira opened 1 year ago

bmbferreira commented 1 year ago

What is the current status of this action? Last release was in January, I see a couple of PRs still open (I have one open for several months already without any answer from you). Seems that you are not answering any of the open issues as well. It would be good to know if there are any plans to maintain this action. Thank you

sombriks commented 1 year ago

Yeah me too am worried about this project, willing to see PR reviews and new releases soon

OzzieOrca commented 1 year ago

I ended up using https://github.com/marketplace/actions/update-json-file instead to since it's just manually editing JSON. It edits the JSON file in place and saves it to disk.

The usage looks like this:

# ...

env:
  ECR_REPOSITORY_ONE: name-one
  ECR_REPOSITORY_TWO: name-two
  ECS_TASK_DEFINITION: .aws/task-definition.json

  ECS_TASK_FAMILY_DEV: family-name-dev
  ECS_TASK_ROLE_ARN_DEV: family-name-ecs-dev-task-role
  ECS_TASK_EXECUTION_ROLE_ARN_DEV: family-name-ecs-dev-task-execution-role
  CONTAINER_DEV_SECRETS: |-
    [
      {
        "name": "SECRET_ONE",
        "valueFrom": "arn:aws:ssm:us-east-1:****:parameter/SECRET_ONE"
      },
      {
        "name": "SECRET_TWO",
        "valueFrom": "arn:aws:ssm:us-east-1:****:parameter/SECRET_TWO"
      }
    ]

jobs:
  deploy:
    name: Test Deploy
    runs-on: ubuntu-latest

    steps:
      # other steps

      - name: Update ECS Task Definition with dev environment config
        uses: restackio/update-json-file-action@v2.0
        with:
          file: ${{ env.ECS_TASK_DEFINITION }}
          fields: |
            {
              "containerDefinitions[0].image": "${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY_ONE }}:${{ github.sha }}",
              "containerDefinitions[1].image": "${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY_TWO }}:${{ github.sha }}",
              "containerDefinitions[0].secrets": ${{ env.CONTAINER_DEV_SECRETS }},
              "family": "${{ env.ECS_TASK_FAMILY_DEV }}",
              "taskRoleArn": "${{ env.ECS_TASK_ROLE_ARN_DEV }}",
              "executionRoleArn": "${{ env.ECS_TASK_EXECUTION_ROLE_ARN_DEV }}"
            }

      - name: Register new task definition for manual deploy later
        uses: aws-actions/amazon-ecs-deploy-task-definition@v1
        with:
          task-definition: ${{ env.ECS_TASK_DEFINITION }}
          wait-for-service-stability: false
          # service and cluster could be defined here to deploy now
bmbferreira commented 1 year ago

hello? @clareliguori? anyone?