Skip to content

Commit 48f5888

Browse files
committed
Idea 2: Render new task definition based on latest one
1 parent b8258c9 commit 48f5888

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/deploy-application.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,29 @@ jobs:
8989
id: create-web-task-definition
9090
uses: aws-actions/amazon-ecs-render-task-definition@v1
9191
with:
92-
task-definition: config/environments/${{ inputs.environment }}-web-task-definition.json
92+
task-definition-family: "mavis-web-task-definition-${{ inputs.environment }}"
9393
container-name: "application"
9494
image: "${{ env.aws_account_id }}.dkr.ecr.eu-west-2.amazonaws.com/mavis/webapp@${{ steps.get-image-digest.outputs.digest }}"
95+
environment-variables: | # TODO Fetch these values from e.g. container_variables.yml
96+
RAILS_ENV=staging
97+
TEST=test
98+
secrets: |
99+
RAILS_MASTER_KEY=/copilot/mavis/secrets/STAGING_RAILS_MASTER_KEY
100+
TESTSECRET=test
95101
- name: Populate good-job task definition
96102
if: inputs.server_types == 'good-job' || inputs.server_types == 'all'
97103
id: create-good-job-task-definition
98104
uses: aws-actions/amazon-ecs-render-task-definition@v1
99105
with:
100-
task-definition: config/environments/${{ inputs.environment }}-good-job-task-definition.json
106+
task-definition-family: "mavis-good-job-task-definition-${{ inputs.environment }}"
101107
container-name: "application"
102108
image: "${{ env.aws_account_id }}.dkr.ecr.eu-west-2.amazonaws.com/mavis/webapp@${{ steps.get-image-digest.outputs.digest }}"
109+
environment-variables: | # TODO Fetch these values from e.g. container_variables.yml
110+
RAILS_ENV=stagingg
111+
TEST=test
112+
secrets: |
113+
RAILS_MASTER_KEY=/copilot/mavis/secrets/STAGING_RAILS_MASTER_KEY
114+
TESTSECRET=test
103115
- name: Upload artifact for web task definition
104116
if: inputs.server_types == 'web' || inputs.server_types == 'all'
105117
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)