-
Notifications
You must be signed in to change notification settings - Fork 90
52 lines (45 loc) · 1.37 KB
/
deploy-lambdas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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=$PWD/lambdas/${{ matrix.path }}
shared_dir=$PWD/lambdas/shared
build_script=$PWD/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..."