Skip to content

changed generated-ai-labels-lambda fn #32

changed generated-ai-labels-lambda fn

changed generated-ai-labels-lambda fn #32

Workflow file for this run

name: Deploy AWS CDK
# Controls when the action will run.
on:
push:
branches: [ main ]
#pull_request:
#branches: [ main ]
env:
OPENSEARCH_HOST_ENDPOINT: ${{ secrets.OPENSEARCH_HOST_ENDPOINT }}
ESUSERNAME: ${{ secrets.ESUSERNAME }}
ESPASSWORD: ${{ secrets.ESPASSWORD }}
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
aws_cdk:
runs-on: ubuntu-latest
environment: dev
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::533267413906:role/GithubRoleAdmin
role-session-name: samplerolesession
- name: install npm
run: 'sudo apt update -y && sudo apt install nodejs npm -y'
- name: Install AWS CDK
run: 'sudo npm install -g aws-cdk'
- name: Install Requirements
run: 'pip3 install -r requirements.txt'
working-directory: .
- name: Install Requirements for Generate AI Labels Handler
run: 'pip install -r ./lambdas/imageinquiry-generate-ai-labels-handler/requirements.txt --target=./layers/generate-ai-labels-packages/python/lib/python3.12/site-packages'
working-directory: .
- name: Install Requirements for Upload Handler
run: |
pip install -r ./lambdas/imageinquiry-upload-handler/requirements.txt --target=./layers/upload-packages/python/lib/python3.12/site-packages
working-directory: .
- name: Install Requirements for Search Handler
run: |
pip install -r ./lambdas/imageinquiry-search-handler/requirements.txt --target=./layers/search-handler-packages/python/lib/python3.12/site-packages
working-directory: .
- name: CDK Synth
run: cdk synth
working-directory: .
- name: CDK bootstrap
run: cdk bootstrap
working-directory: .
- name: CDK Deploy
run: cdk deploy --require-approval never
working-directory: .
# - name: CDK Destroy
# run: cdk destroy --force
# working-directory: .