-
Notifications
You must be signed in to change notification settings - Fork 186
46 lines (37 loc) · 1.19 KB
/
rebuild-skill-index.yml
File metadata and controls
46 lines (37 loc) · 1.19 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
name: Rebuild Skill Index
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
permissions:
contents: write
jobs:
rebuild-index:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install CLI
run: npm install -g ai-devkit
- name: Rebuild skill index
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ai-devkit skill rebuild-index --output skills/index.json
- name: Check for changes
id: git-check
run: |
git diff --quiet skills/index.json || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.git-check.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add skills/index.json
git commit -m "chore: update skill index [automated]"
git push