-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.17 KB
/
deploy_lambda.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
on:
push:
branches:
- main
jobs:
sam-deploy:
runs-on: ubuntu-latest
if: ${{ vars.DEPLOY_LAMBDA == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-gnu
- name: Install Zig toolchain
uses: korandoru/setup-zig@v1
with:
zig-version: 0.13.0
- name: Install Cargo Lambda
uses: jaxxstorm/[email protected]
with:
repo: cargo-lambda/cargo-lambda
platform: linux
arch: x86_64
- run: cargo lambda build --release --features lambda --arm64
- uses: aws-actions/setup-sam@v2
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- run: |
cd deploy/aws_sam
sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --parameter-overrides RustLog="${{ vars.RUST_LOG }}" PostgresUri="${{ secrets.POSTGRES_URI }}"