SFR-2168: Fix FeedbackBox issue #259
Workflow file for this run
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
# On merge to development, | |
# build a container and deploy to ECR | |
name: Publish qa | |
on: | |
pull_request: | |
branches: [development] | |
types: [closed] | |
jobs: | |
publish_qa: | |
name: Publish image to ECR | |
if: github.event.pull_request.merged | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version-file: ".nvmrc" | |
cache: npm | |
- name: Configure AWS credentials from Test account | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build, tag, and push image to Amazon ECR | |
env: | |
APP_ENV: qa | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
ECR_REPOSITORY: sfr-front-end | |
IMAGE_TAG: ${{ github.sha }} | |
AIRTABLE_KEY: ${{ secrets.AIRTABLE_API_KEY }} | |
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
run: | | |
docker build --build-arg airtable_api_key=$AIRTABLE_KEY -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \ | |
--build-arg APP_ENV=$APP_ENV \ | |
--build-arg NEW_RELIC_APP_NAME="Digital Research Books (QA)" \ | |
--build-arg NEW_RELIC_LICENSE_KEY=$NEW_RELIC_LICENSE_KEY \ | |
--build-arg NEXT_PUBLIC_ADOBE_ANALYTICS="https://assets.adobedtm.com/1a9376472d37/8519dfce636d/launch-bf8436264b01-development.min.js" . | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:qa-latest | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:qa-latest | |
- name: Force ECS Update | |
run: | | |
aws ecs update-service --cluster sfr-front-end-qa --service sfr-front-end-qa --force-new-deployment |