-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 3.04 KB
/
Copy pathops_sync_kimi_code.yml
File metadata and controls
84 lines (73 loc) · 3.04 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
81
82
83
84
# Ops Desk P0-2 · MoonshotAI/kimi-code 日同步(24h cron + 手动触发)
name: ops-sync-kimi-code
on:
schedule:
# 每日 UTC 02:00(约北京时间 10:00)
- cron: "0 2 * * *"
workflow_dispatch:
permissions:
contents: read
issues: read
pull-requests: read
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
OPS_SYNC_TRIGGER: ${{ github.event_name == 'workflow_dispatch' && 'manual' || 'cron' }}
OPS_SCAN_INDEX_PATH: workspace/docs/harness/guides/ISSUE_SCAN_kimi_code_open_c2_v1_zh.md
OPS_SCAN_RAW_URL: https://raw.githubusercontent.com/Cyning12/cyning-ink-workspace/main/docs/harness/guides/ISSUE_SCAN_kimi_code_open_c2_v1_zh.md
WORKSPACE_REPO_TOKEN: ${{ secrets.WORKSPACE_REPO_TOKEN }}
KIMI_META_REPO_TOKEN: ${{ secrets.KIMI_META_REPO_TOKEN }}
# OPS_GRAPH_* 路径相对 checkout path=workspace/kimi-code-meta(远程仓 Cyning12/kimi-code)
OPS_GRAPH_JSON_PATH: workspace/kimi-code-meta/docs/_tech_graph/graph.json
OPS_MANIFEST_JSON_PATH: workspace/kimi-code-meta/.cyning-harness/manifest.json
OPS_GRAPH_SOURCE_BRANCH: cyning/meta
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout workspace ISSUE_SCAN
if: ${{ env.WORKSPACE_REPO_TOKEN != '' }}
uses: actions/checkout@v5
with:
repository: Cyning12/cyning-ink-workspace
ref: main
path: workspace
token: ${{ secrets.WORKSPACE_REPO_TOKEN }}
sparse-checkout: |
docs/harness/guides/
sparse-checkout-cone-mode: false
- name: Warn missing workspace token
if: ${{ env.WORKSPACE_REPO_TOKEN == '' }}
run: |
echo "::warning::WORKSPACE_REPO_TOKEN not configured; ISSUE_SCAN ingest will be skipped."
- name: Checkout kimi-code graph (Cyning12/kimi-code @ cyning/meta)
if: ${{ env.KIMI_META_REPO_TOKEN != '' }}
uses: actions/checkout@v5
with:
repository: Cyning12/kimi-code
ref: cyning/meta
path: workspace/kimi-code-meta
token: ${{ secrets.KIMI_META_REPO_TOKEN }}
sparse-checkout: |
docs/_tech_graph/graph.json
docs/_tech_graph/graph_module_flow_map.yaml
.cyning-harness/manifest.json
sparse-checkout-cone-mode: false
- name: Warn missing kimi-meta token
if: ${{ env.KIMI_META_REPO_TOKEN == '' }}
run: |
echo "::warning::KIMI_META_REPO_TOKEN not configured; graph ingest will be skipped."
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run kimi-code sync
run: python scripts/ops_sync_kimi_code.py