Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 4d0dee1

Browse files
committed
Attempt at auto building vector DB in CI
1 parent 00d9a75 commit 4d0dee1

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/workflows/image-publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,14 @@ jobs:
5959
github_token: ${{ github.token }}
6060
workflow: ".github/workflows/import_packages.yml"
6161
workflow_conclusion: success
62-
name: backup_weaviate
62+
name: sqlite_vectordb_file
6363
name_is_regexp: true
6464
skip_unpack: false
6565
if_no_artifact_found: ignore
6666
- name: Fetch latest FE commit SHA
6767
id: fetch_commit_fe_sha
6868
run: |
6969
echo "LATEST_RELEASE=$(curl -s "https://api.github.com/repos/stacklok/codegate-ui/releases/latest" -H "Authorization: Bearer ${{ secrets.GH_CI_TOKEN }}" | grep '"zipball_url":' | cut -d '"' -f 4)" >> $GITHUB_ENV
70-
- name: Rename to accommodate to image
71-
run: mv ./backup_weaviate ./weaviate_backup
7270
- name: Download git lfs dependencies
7371
run: |
7472
git lfs install

.github/workflows/import_packages.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,18 @@ jobs:
5151
github_token: ${{ github.token }}
5252
workflow: ".github/workflows/import_packages.yml"
5353
workflow_conclusion: success
54-
name: backup_weaviate
54+
name: sqlite_vectordb_file
5555
path: /tmp/
5656
name_is_regexp: true
5757
skip_unpack: false
58-
if_no_artifact_found: ignore
58+
if_no_artifact_found: ignore
5959

60-
- name: Create folder if artifact download is not enabled
61-
if: ${{ github.event.inputs.enable_artifact_download == 'false' }}
60+
- name: 'Run import_packages.py'
6261
run: |
63-
mkdir -p /tmp/backup_weaviate
64-
echo "Folder ./backup_weaviate created because artifact download is disabled."
62+
python scripts/import_packages.py --jsonl-dir /tmp --vec-db-path /tmp/sqlite_data/vectordb.db
6563
66-
- name: Run sync
67-
run: |
68-
export PYTHONPATH=$PYTHONPATH:./
69-
export BACKUP_FILESYSTEM_PATH=/tmp/backup_weaviate/
70-
export BACKUP_FOLDER=backup
71-
# Conditionally export the variables only if artifact download is enabled
72-
if [ "${{ github.event.inputs.enable_artifact_download }}" == "true" ]; then
73-
python scripts/import_packages.py --jsonl-dir /tmp/jsonl-files/
74-
else
75-
python scripts/import_packages.py --restore-backup False --jsonl-dir /tmp/jsonl-files/
76-
fi
77-
78-
- name: 'Upload Backup Files'
64+
- name: 'Upload SQLite Vector DB File'
7965
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
8066
with:
81-
name: backup_weaviate
82-
path: /tmp/backup_weaviate/backup*
83-
retention-days: 90
67+
name: sqlite_vectordb_file
68+
path: /tmp/sqlite_data/vectordb.db

0 commit comments

Comments
 (0)