Skip to content

test the workflow

test the workflow #6

Workflow file for this run

name: Deploy catalog to ECR
on:
push:
branches:
- master
- fix-ci-deploy-catalog
paths:
- '.github/workflows/deploy-catalog.yaml'
- 'catalog/**'
- 'shared/**'
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@v4
- uses: actions/setup-node@v4
with:
node-version: '16.11'
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@v4
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: Configure AWS credentials from GovCloud account
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws-us-gov:iam::313325871032:role/github/GitHub-Quilt
aws-region: us-gov-east-1
- name: Login to GovCloud ECR
id: login-govcloud-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push Docker image to Prod and GovCloud ECR
run: |
docker buildx build \
-t ${{ steps.login-prod-ecr.outputs.registry }}/quiltdata/catalog:${{ github.sha }} \
-t ${{ steps.login-govcloud-ecr.outputs.registry }}/quiltdata/catalog:${{ github.sha }} \
.
docker push ${{ steps.login-prod-ecr.outputs.registry }}/quiltdata/catalog:${{ github.sha }}
docker push ${{ steps.login-govcloud-ecr.outputs.registry }}/quiltdata/catalog:${{ github.sha }}