-
Notifications
You must be signed in to change notification settings - Fork 350
55 lines (53 loc) · 2.09 KB
/
publish_lambda_packages.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
52
53
54
55
name: Build and publish AWS Lambda packages
on:
push:
tags:
- "aws-lambda-beta-*"
jobs:
build-lambdas:
name: Build Quickwit Lambdas
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu packages
run: sudo apt-get -y install protobuf-compiler python3 python3-pip
- name: Install rustup
run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain none -y
- name: Install python dependencies
run: |
pip install --user pipenv
pipenv install --system
working-directory: ./distribution/lambda
- name: Lint and format
run: |
mypy --version
mypy .
black . --check
working-directory: ./distribution/lambda
- name: Retrieve and export commit date, hash, and tags
run: |
echo "QW_COMMIT_DATE=$(TZ=UTC0 git log -1 --format=%cd --date=format-local:%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
echo "QW_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "QW_COMMIT_TAGS=$(git tag --points-at HEAD | tr '\n' ',')" >> $GITHUB_ENV
- name: Build Quickwit Lambdas
run: make package
env:
QW_COMMIT_DATE: ${{ env.QW_COMMIT_DATE }}
QW_COMMIT_HASH: ${{ env.QW_COMMIT_HASH }}
QW_COMMIT_TAGS: ${{ env.QW_COMMIT_TAGS }}
QW_LAMBDA_BUILD: 1
working-directory: ./distribution/lambda
- name: Extract package locations
run: |
echo "SEARCHER_PACKAGE_LOCATION=./distribution/lambda/$(make searcher-package-path)" >> $GITHUB_ENV
echo "INDEXER_PACKAGE_LOCATION=./distribution/lambda/$(make indexer-package-path)" >> $GITHUB_ENV
working-directory: ./distribution/lambda
- name: Upload Lambda archives
uses: quickwit-inc/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ${{ env.SEARCHER_PACKAGE_LOCATION }};${{ env.INDEXER_PACKAGE_LOCATION }}
overwrite: true
draft: true
tag_name: ${{ github.ref_name }}