Skip to content

refactor: export pure functions, add isMain guard, expand test coverage #3

refactor: export pure functions, add isMain guard, expand test coverage

refactor: export pure functions, add isMain guard, expand test coverage #3

Workflow file for this run

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@v6
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- 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: pnpm nextdns-skills-build 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