Skip to content

docs: improve subagent invocation clarity and add context reference g… #10

docs: improve subagent invocation clarity and add context reference g…

docs: improve subagent invocation clarity and add context reference g… #10

name: Update Component Registry
on:
push:
branches:
- main
paths:
- '.opencode/**'
- '!registry.json'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-registry:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Run component registration
run: |
chmod +x scripts/register-component.sh
./scripts/register-component.sh
- name: Check for changes
id: check_changes
run: |
if git diff --quiet registry.json; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes to registry.json"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Registry has been updated"
fi
- name: Commit and push changes
if: steps.check_changes.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 registry.json
git commit -m "chore: auto-update component registry [skip ci]"
git push
- name: Summary
if: steps.check_changes.outputs.changed == 'true'
run: |
echo "✅ Registry updated successfully" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Updated Components" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
jq -r '
"- **Agents:** \(.components.agents | length)",
"- **Subagents:** \(.components.subagents | length)",
"- **Commands:** \(.components.commands | length)",
"- **Tools:** \(.components.tools | length)",
"- **Plugins:** \(.components.plugins | length)",
"- **Contexts:** \(.components.contexts | length)"
' registry.json >> $GITHUB_STEP_SUMMARY
- name: No changes summary
if: steps.check_changes.outputs.changed == 'false'
run: |
echo "ℹ️ No changes to registry" >> $GITHUB_STEP_SUMMARY