ContactDiscoveryService-Ice.../.github/workflows/push-lambda.yml
2026-04-15 13:44:31 -07:00

46 lines
1.4 KiB
YAML

name: Build and push filter-cds-updates lambda
on:
release:
types: [published]
env:
REF_NAME: ${{ github.ref_name }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
with:
role-to-assume: ${{ vars.AWS_IAM_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
- name: Checkout main project
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
# The checkout action clobbers our annotated tags with lightweight tags, which confuses JGITVER.
# Please see https://github.com/actions/checkout/issues/882 for additional discussion.
- name: Fetch tags
run: git fetch --tags --force origin
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'
- name: Build and lambda jar
working-directory: filter-cds-updates
run: ../mvnw -e -B verify -Djgitver.use-version="${REF_NAME}"
- name: Upload artifact to S3
working-directory: filter-cds-updates
run: aws s3 cp "target/filter-cds-updates-lambda-${REF_NAME}.jar" s3://${{ vars.S3_BUCKET }}/${{ vars.S3_BUCKET_KEY }}/