Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nl0 committed Feb 22, 2024
1 parent ddfd3da commit a064069
Showing 1 changed file with 50 additions and 49 deletions.
99 changes: 50 additions & 49 deletions .github/workflows/deploy-lambdas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- lambdas-modern-checksums
paths:
- '.github/workflows/deploy-lambdas.yaml'
- 'lambdas/**'
Expand All @@ -13,17 +14,17 @@ jobs:
strategy:
matrix:
path:
- access_counts
- indexer
- pkgevents
# - access_counts
# - indexer
# - pkgevents
- pkgpush
- pkgselect
- preview
# - pkgselect
# - preview
- s3hash
- s3select
- status_reports
- tabular_preview
- transcode
# - s3select
# - status_reports
# - tabular_preview
# - transcode
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
Expand Down Expand Up @@ -51,45 +52,45 @@ jobs:
aws-region: us-east-1
- name: Upload zips to Prod S3
run: |
s3_key="${{ matrix.path }}/${{ github.sha }}.zip"
./lambdas/scripts/upload_zip.sh ./out.zip "$AWS_REGION" "$s3_key"
- 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: Upload zips to GovCloud S3
run: |
s3_key="${{ matrix.path }}/${{ github.sha }}.zip"
s3_key="${{ matrix.path }}/test-${{ github.sha }}.zip"
./lambdas/scripts/upload_zip.sh ./out.zip "$AWS_REGION" "$s3_key"
# - 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: Upload zips to GovCloud S3
# run: |
# s3_key="${{ matrix.path }}/${{ github.sha }}.zip"
# ./lambdas/scripts/upload_zip.sh ./out.zip "$AWS_REGION" "$s3_key"

deploy-lambda-ecr:
strategy:
matrix:
path:
- molecule
- thumbnail
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Build Docker image
working-directory: ./lambdas/${{ matrix.path }}
run: docker buildx build -t "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}" -f Dockerfile ..
- 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: Push Docker image to Prod ECR
run: ./lambdas/scripts/upload_ecr.sh 730278974607 "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}"
- 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: Push Docker image to GovCloud ECR
run: ./lambdas/scripts/upload_ecr.sh 313325871032 "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}"
# deploy-lambda-ecr:
# strategy:
# matrix:
# path:
# - molecule
# - thumbnail
# runs-on: ubuntu-latest
# # These permissions are needed to interact with GitHub's OIDC Token endpoint.
# permissions:
# id-token: write
# contents: read
# steps:
# - uses: actions/checkout@v4
# - name: Build Docker image
# working-directory: ./lambdas/${{ matrix.path }}
# run: docker buildx build -t "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}" -f Dockerfile ..
# - 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: Push Docker image to Prod ECR
# run: ./lambdas/scripts/upload_ecr.sh 730278974607 "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}"
# - 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: Push Docker image to GovCloud ECR
# run: ./lambdas/scripts/upload_ecr.sh 313325871032 "quiltdata/lambdas/${{ matrix.path }}:${{ github.sha }}"

0 comments on commit a064069

Please sign in to comment.