Support encrypted RDS instance (#28) #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy_ecs_staging: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.DEPLOY_USER_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.DEPLOY_USER_AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-west-2 | |
- name: docker build, tag, and push image to Amazon ECR | |
env: | |
ECR_REGISTRY: 853558080719.dkr.ecr.us-west-2.amazonaws.com/tf-veda-wfs3-registry-west2-staging | |
IMAGE_TAG: latest | |
run: | | |
aws ecr get-login-password | docker login --username AWS --password-stdin $ECR_REGISTRY | |
cd veda-wfs3-app | |
docker build -t $ECR_REGISTRY:$IMAGE_TAG . | |
docker push $ECR_REGISTRY:$IMAGE_TAG | |
echo "::set-output name=image::$ECR_REGISTRY:$IMAGE_TAG" | |
- name: ECS refresh service | |
env: | |
ECS_SERVICE_NAME: tf-veda-wfs3-service-west2-staging | |
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOY_USER_AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOY_USER_AWS_SECRET_ACCESS_KEY }} | |
run: | | |
aws ecs update-service \ | |
--cluster $ECS_SERVICE_NAME \ | |
--service $ECS_SERVICE_NAME \ | |
--task-definition $ECS_SERVICE_NAME \ | |
--force-new-deployment | |