Skip to content

Deploy catalog to ECR #708

Deploy catalog to ECR

Deploy catalog to ECR #708

name: Deploy catalog to ECR
# dx-dp-browse: dispatch-only variant — builds this branch and pushes to the
# prod ECR only (no GovCloud/MP), for pinning on dev stacks. The master version
# of this workflow is push-triggered and pushes to all three registries.
on:
workflow_dispatch:
jobs:
deploy-catalog-ecr:
runs-on: ubuntu-latest
defaults:
run:
working-directory: catalog
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version-file: 'catalog/package.json'
cache: 'npm'
cache-dependency-path: 'catalog/package-lock.json'
- run: npm ci
- run: npm run build
- name: Configure AWS credentials from Prod account
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: arn:aws:iam::730278974607:role/github/GitHub-Quilt
aws-region: us-east-1
- name: Login to Prod ECR
id: login-prod-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push Docker image to Prod ECR
env:
ECR_REGISTRY_PROD: ${{ steps.login-prod-ecr.outputs.registry }}
ECR_REPOSITORY: quiltdata/catalog
IMAGE_TAG: ${{ github.sha }}
run: |
docker buildx build \
-t $ECR_REGISTRY_PROD/$ECR_REPOSITORY:$IMAGE_TAG \
.
docker push $ECR_REGISTRY_PROD/$ECR_REPOSITORY:$IMAGE_TAG