Skip to content

try building qa

try building qa #1

Workflow file for this run

name: Deploy QA
on:
push:
branches:
- DR-3256-migrate-ci-to-gh-actions
permissions:
id-token: write
contents: read
jobs:
deploy_qa:
name: Deploy QA
runs-on: ubuntu-latest
environment: qa
steps:
- name: checkout
uses: actions/checkout@v2
- name: Configure AWS credentials for QA environment account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::685731035297:role/GithubActionsDeployerRole
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:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: fedora-ingest
IMAGE_TAG: ${{ github.sha }}
run: |
docker build --target production -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
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 fedora-ingest-rails-qa --service fedora-ingest-rails-web-application-qa --force-new-deployment
# aws ecs update-service --cluster fedora-ingest-rails-qa --service fedora-ingest-rails-worker-qa --force-new-deployment