Skip to content

Update aws-lambda-java-events to 3.11.6 (#79) #267

Update aws-lambda-java-events to 3.11.6 (#79)

Update aws-lambda-java-events to 3.11.6 (#79) #267

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
id-token: write
contents: read
env:
AWS_REGION: ${{ secrets.AWS_REGION }}
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
ECR_REPO_NAME: ${{ secrets.ECR_REPO_NAME }}
IMAGE_LATEST_TAG: "latest"
LAMBDA_NAME: ${{ secrets.LAMBDA_NAME }}
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-test-push:
name: Build, test and push
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/[email protected]
env:
SHELLCHECK_OPTS: --severity style --enable all --exclude SC2312 --shell bash
with:
check_together: yes
scandir: "./scripts"
- name: Get JDK version
run: |
source scripts/get_java_version.sh
echo "JAVA_VERSION=${JAVA_VERSION}" >> "${GITHUB_ENV}"
- name: Get sbt version
run: |
source scripts/get_sbt_version.sh
echo "SBT_VERSION=${SBT_VERSION}" >> "${GITHUB_ENV}"
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin"
- name: Scalafmt check
run: sbt scalafmtSbtCheck scalafmtCheck Test/scalafmtCheck
# building the image also performs unit and integration tests
# - name: Run tests
# run: sbt test IntegrationTest/test
- name: Build image
run: ./scripts/build_docker_image.sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
if: github.ref == 'refs/heads/master' && contains(fromJson('["push", "workflow_dispatch"]'), github.event_name)
with:
role-to-assume: ${{ secrets.PROD_CI_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Push image
if: github.ref == 'refs/heads/master' && contains(fromJson('["push", "workflow_dispatch"]'), github.event_name)
run: ./scripts/push_image_to_ecr.sh
- name: Update lambda
if: github.ref == 'refs/heads/master' && contains(fromJson('["push", "workflow_dispatch"]'), github.event_name)
run: ./scripts/update_lambda_image_uri.sh
- name: ECR cleanup
if: github.ref == 'refs/heads/master' && contains(fromJson('["push", "workflow_dispatch"]'), github.event_name)
run: ./scripts/ecr_cleanup.sh