Skip to content

Commit f41acc9

Browse files
author
Daniele Briggi
committed
feat: support to selection/exclusion files by extension
1 parent 180a1e7 commit f41acc9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

action.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ inputs:
1515
source_files:
1616
description: The path of the files, by default it will parse every file recursively starting from the working directory.
1717
required: false
18-
default: $(pwd)
18+
default: "./"
19+
only_extensions:
20+
description: Comma-separated list of file extensions to include (e.g., "md,txt,html"). If not set, all supported file types are included.
21+
required: false
22+
default: ""
23+
exclude_extensions:
24+
description: Comma-separated list of file extensions to exclude (e.g., "js,jsx"). If not set, no file types are excluded.
25+
required: false
26+
default: ""
1927
hf_model_id:
2028
description: The Hugging Face model ID to use for generating embeddings.
2129
required: false
@@ -79,7 +87,9 @@ runs:
7987
sqlite-rag add \
8088
--recursive "${{ inputs.source_files }}" \
8189
--metadata '{"base_url": "${{ inputs.base_url }}"}' \
82-
--relative-paths
90+
--relative-paths \
91+
--only "${{ inputs.only_extensions }}" \
92+
--exclude "${{ inputs.exclude_extensions }}"
8393
shell: bash
8494

8595
- name: Upload the database to SQLite Cloud

0 commit comments

Comments
 (0)