-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathaugment-index.yml
More file actions
81 lines (71 loc) · 2.39 KB
/
augment-index.yml
File metadata and controls
81 lines (71 loc) · 2.39 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Index Repository
on:
push:
branches:
- main
- develop
- 'feature/**' # Index feature branches
- 'release/**' # Index release branches
workflow_dispatch:
inputs:
branch:
description: 'Branch to index (leave empty for current branch)'
required: false
type: string
force_full_reindex:
description: 'Force full re-index'
required: false
type: boolean
default: false
jobs:
index:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for comparison
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: pip install -r augment_indexer/requirements.txt
- name: Restore index state
uses: actions/cache@v4
with:
path: .augment-index-state
# Use branch-specific cache key
key: augment-index-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
augment-index-${{ github.ref_name }}-
- name: Index repository
id: index
run: python -m augment_indexer.main
env:
AUGMENT_API_TOKEN: ${{ secrets.AUGMENT_API_TOKEN }}
AUGMENT_API_URL: ${{ secrets.AUGMENT_API_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STORAGE_TYPE: file
# Branch-specific state path (automatically determined from GITHUB_REF)
# STATE_PATH is optional - defaults to .augment-index-state/{branch}/state.json
MAX_COMMITS: 100
MAX_FILES: 500
- name: Print results
if: always()
run: |
echo "Success: ${{ steps.index.outputs.success }}"
echo "Type: ${{ steps.index.outputs.type }}"
echo "Files Indexed: ${{ steps.index.outputs.files_indexed }}"
echo "Files Deleted: ${{ steps.index.outputs.files_deleted }}"
echo "Checkpoint ID: ${{ steps.index.outputs.checkpoint_id }}"
echo "Commit SHA: ${{ steps.index.outputs.commit_sha }}"
- name: Upload state artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: index-state
path: .augment-index-state/
retention-days: 30
include-hidden-files: true