-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.62 KB
/
Copy pathbuild-agents.yml
File metadata and controls
64 lines (53 loc) · 1.62 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
name: Build AGENTS.md
on:
push:
branches: [main, develop]
paths:
- 'skills/**/rules/**/*.md'
- 'skills/**/metadata.json'
workflow_dispatch:
inputs:
skill:
description: 'Skill to build (leave empty for all)'
required: false
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build-agents:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build
- name: Build AGENTS.md (all skills)
if: ${{ github.event.inputs.skill == '' }}
run: pnpm build:skills
- name: Build AGENTS.md (single skill)
if: ${{ github.event.inputs.skill != '' }}
run: node packages/nextdns-skills-build/dist/cli.mjs build --skill=${{ github.event.inputs.skill }}
- name: Commit and push AGENTS.md changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f 'skills/**/AGENTS.md'
if git diff --cached --quiet; then
echo "No AGENTS.md changes to commit"
else
git commit -m "docs: rebuild AGENTS.md [skip ci]"
git push
fi