- Add component registry (registry.json) with 4 installation profiles - Create interactive installer (install.sh) with profile and custom selection - Add auto-registration script for CI/CD integration - Create validation script for component structure - Add update script for keeping components current - Include GitHub Actions workflow for auto-registry updates - Update README with installation instructions - Add CONTRIBUTING guide for new components Features: - Interactive CLI with colored output and menus - Smart dependency resolution - Backup existing installations - Profile-based installation (core, developer, full, advanced) - Custom component selection - Component validation and testing tools
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
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
|