-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (33 loc) · 1.05 KB
/
6-start-ingestion.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: start-ingestion-job
on:
# push:
# branches:
# - main
schedule:
- cron: "0 21 * * 0-4"
env:
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.9 🐍
uses: actions/setup-python@v4
with:
python-version: 3.9
- 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 }}
AWS_REGION: "us-east-1"
run: |
aws bedrock-agent start-ingestion-job \
--knowledge-base-id ${{ env.KNOWLEDGE_BASE_ID }} \
--data-source-id ${{ env.DATA_SOURCE_ID }}