Skip to content

start-ingestion-job #61

start-ingestion-job

start-ingestion-job #61

name: start-ingestion-job
on:
# push:
# branches:
# - main
schedule:
- cron: "0 21 * * 0-4"
env:
AWS_REGION: "us-east-1"
ENABLE_NOTION_SYNC: ${{ vars.ENABLE_NOTION_SYNC }}
KNOWLEDGE_BASE_ID: ${{ vars.KNOWLEDGE_BASE_ID }}
DATA_SOURCE_ID: ${{ vars.DATA_SOURCE_ID }}
jobs:
ingestion:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python 3.11 🐍
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Sync to AWS Bedrock Knowledge Base
if: env.ENABLE_NOTION_SYNC == 'Yes' && env.KNOWLEDGE_BASE_ID != 'None' && env.DATA_SOURCE_ID != 'None'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws bedrock-agent start-ingestion-job \
--knowledge-base-id ${{ env.KNOWLEDGE_BASE_ID }} \
--data-source-id ${{ env.DATA_SOURCE_ID }} \
--region ${{ env.AWS_REGION }}