configure vars and secrets #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
sam-deploy: | ||
runs-on: ubuntu-latest | ||
if: secrets.AWS_ACCESS_KEY_ID != '' && secrets.AWS_SECRET_ACCESS_KEY != '' | ||
Check failure on line 8 in .github/workflows/deploy_lambda.yml GitHub Actions / .github/workflows/deploy_lambda.ymlInvalid workflow file
|
||
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 | ||
- 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 --parameter-overrides RustLog="${{ vars.RUST_LOG }}" PostgresUri="${{ secrets.POSTGRES_URI }}" |