Skip to content

Commit

Permalink
Split into a new .yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaryaz committed Jan 29, 2024
1 parent afdfd0e commit 779464f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 45 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/deploy-lambdas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy lambdas to S3 and ECR

on:
push:
branches:
- ci_deploy_lambdas

jobs:
deploy-lambda:
strategy:
matrix:
path:
- access_counts
- es/indexer
- molecule
- pkgevents
- pkgpush
- pkgselect
- preview
- s3hash
- s3select
- status_reports
- tabular_preview
- thumbnail
- transcode
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build zip
run: |
BUILDER_IMAGE=quiltdata/lambda:build-3.8
zip_file=$(realpath "$(mktemp)")
function_dir=lambdas/${{ matrix.path }}
shared_dir=lambdas/shared
build_script=lambdas/build_zip.sh
echo "Pulling latest $BUILDER_IMAGE from Docker Hub"
docker pull $BUILDER_IMAGE
# require the :build tag so we can build aicsimageio, etc.
# see https://github.com/quiltdata/lambda/pull/2
docker run --rm \
--entrypoint /build_zip.sh \
-v "$function_dir":/lambda/function:z \
-v "$shared_dir":/lambda/shared:z \
-v "$zip_file":/out.zip:z \
-v "$build_script":/build_zip.sh:z \
$BUILDER_IMAGE
echo "Done running Docker..."
45 changes: 0 additions & 45 deletions .github/workflows/py-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,48 +212,3 @@ jobs:
flags: lambda
name: ${{ github.job }}
env_vars: LAMBDA
deploy-lambda:
needs: test-lambda
# if: github.ref == 'refs/heads/master'
strategy:
matrix:
path:
- access_counts
- es/indexer
- molecule
- pkgevents
- pkgpush
- pkgselect
- preview
- s3hash
- s3select
- status_reports
- tabular_preview
- thumbnail
- transcode
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build zip
run: |
BUILDER_IMAGE=quiltdata/lambda:build-3.8
zip_file=$(realpath "$(mktemp)")
function_dir=lambdas/${{ matrix.path }}
shared_dir=lambdas/shared
build_script=lambdas/build_zip.sh
echo "Pulling latest $BUILDER_IMAGE from Docker Hub"
docker pull $BUILDER_IMAGE
# require the :build tag so we can build aicsimageio, etc.
# see https://github.com/quiltdata/lambda/pull/2
docker run --rm \
--entrypoint /build_zip.sh \
-v "$function_dir":/lambda/function:z \
-v "$shared_dir":/lambda/shared:z \
-v "$zip_file":/out.zip:z \
-v "$build_script":/build_zip.sh:z \
$BUILDER_IMAGE
echo "Done running Docker..."

0 comments on commit 779464f

Please sign in to comment.