Skip to content

update deployment scripts #5

update deployment scripts

update deployment scripts #5

name: Build and deploy lambda to AWS
on:
workflow_dispatch:
push:
branches: [main]
paths:
- '.github/workflows/buildAndDeployLambda.yaml'
- 'scripts/deployLambda.sc'
- '!**.test.scala'
- '**.scala'
env:
AWS_CLIENT_DEBUG_MODE: ON
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout
jobs:
buildAndDeployLambda:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: VirtusLab/scala-cli-setup@main
with:
jvm: adoptium:1.21
apps: scala scala-cli sbtn
power: true
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::047719648492:role/GithubActionRole
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: eu-central-1
unset-current-credentials: true
- name: Show changelog
run: echo "CHANGELOG=$(git log --pretty='%h %al %B' ${{ github.event.before }}..${{ github.sha }})" | tr -d "\n\r\'" | cut -c -256 >> "$GITHUB_ENV"
- name: Run the script
run: ./scripts/buildAndDeployLambdaNativePackage.sh 64m '${{ env.CHANGELOG }}'
shell: bash