Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy catalog from CI #3872

Merged
merged 5 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/deploy-catalog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy catalog to ECR

on:
push:
branches:
- master
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'
sir-sigurd marked this conversation as resolved.
Show resolved Hide resolved
- 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 }}
2 changes: 0 additions & 2 deletions .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
defaults:
run:
working-directory: catalog
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
Loading