Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Update deployment actions to fix task definition registration (#1679)

sarayourfriend2deff5c5ce2f
diff --git a/.github/actions/production-frontend-deploy/action.yml b/.github/actions/production-frontend-deploy/action.yml
index 3825207ae..1f188335c 100644
--- a/.github/actions/production-frontend-deploy/action.yml
+++ b/.github/actions/production-frontend-deploy/action.yml
@@ -17,7 +17,7 @@ inputs:
aws-secret-access-key:
required: true
slack-webhook:
- required: false
+ required: true
runs:
using: "composite"
@@ -57,12 +57,15 @@ runs:
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: us-east-1
- - name: Download task definition template
+ - name: Download task definition template and update family name
shell: bash
run: |
aws ecs describe-task-definition \
--task-definition production-frontend-template \
- --query taskDefinition > task-definition.json
+ --query taskDefinition > task-defintion.json
+
+ # Remove template from the family name (the render action does not support this)
+ sed 's/"family": "production-frontend-template"/"family": "production-frontend"/g' task-definition.json > task-definition.json
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
@@ -79,6 +82,7 @@ runs:
service: production-frontend
cluster: production-default
wait-for-service-stability: true
+ wait-for-minutes: 10
- name: Notify deployment finished
uses: slackapi/[email protected]
diff --git a/.github/actions/staging-frontend-deploy/action.yml b/.github/actions/staging-frontend-deploy/action.yml
index 9711bfa76..5f5fbff91 100644
--- a/.github/actions/staging-frontend-deploy/action.yml
+++ b/.github/actions/staging-frontend-deploy/action.yml
@@ -17,7 +17,7 @@ inputs:
aws-secret-access-key:
required: true
slack-webhook:
- required: false
+ required: true
runs:
using: "composite"
@@ -57,12 +57,15 @@ runs:
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: us-east-1
- - name: Download task definition template
+ - name: Download task definition template and update family name
shell: bash
run: |
aws ecs describe-task-definition \
--task-definition staging-frontend-template \
- --query taskDefinition > task-definition.json
+ --query taskDefinition > task-defintion.json
+
+ # Remove template from the family name (the render action does not support this)
+ sed 's/"family": "staging-frontend-template"/"family": "staging-frontend"/g' task-definition.json > task-definition.json
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
@@ -79,6 +82,7 @@ runs:
service: staging-frontend
cluster: staging-default
wait-for-service-stability: true
+ wait-for-minutes: 10
- name: Notify deployment finished
uses: slackapi/[email protected]