Skip to content

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#12) #3

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#12)

Bump Swatinem/rust-cache from 2.7.3 to 2.7.5 (#12) #3

name: staging-deployment
on:
push:
branches:
- main
paths:
- ".github/workflows/lambda-deployment-staging.yml"
- "lambdas/**"
permissions:
# This is required for requesting the JWT.
id-token: write
# This is required for actions/checkout.
contents: read
concurrency: ${{ github.ref }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: Install cargo lambda
run: pip install cargo-lambda
# Configure AWS and deploy the lambdas.
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.FEDERATED_GITHUB_ROLE_ARN_STAGING }}
aws-region: ${{ secrets.AWS_REGION_STAGING }}
# Build the lambdas in release mode and deploy them.
- name: Build all lambdas
run: cd lambdas && cargo lambda build --release
- name: deploy lambdas
run: |
LAMBDAS="bna-fargate-run
bna-fargate-status
bna-prepare-destination
bna-save-results
bna-sqs-parse
bna-teardown
scorecard
"
echo $LAMBDAS \
| xargs -n1 -t \
cargo lambda deploy \
--runtime provided.al2023 \
--iam-role ${{ secrets.LAMBDA_ROLE_ARN_STAGING }}