Files
2026-07-13 12:38:34 +08:00

102 lines
3.9 KiB
YAML

name: Docs - Sync Connect Clients
on:
repository_dispatch:
types: [dashboard-production-deploy]
workflow_dispatch:
permissions:
contents: read
jobs:
sync-clients:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: next
fetch-depth: 1
- name: Get client definitions
env:
EVENT_NAME: ${{ github.event_name }}
CLIENT_DEFINITIONS: ${{ github.event.client_payload.client_definitions }}
DASHBOARD_TAG: ${{ github.event.client_payload.dashboard_tag }}
GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
run: |
set -e
if [ "$EVENT_NAME" = "repository_dispatch" ]; then
if [ -z "$CLIENT_DEFINITIONS" ]; then
echo "::error::repository_dispatch payload missing client_definitions"
exit 1
fi
echo "$CLIENT_DEFINITIONS" | base64 -d > /tmp/client-definitions.ts
echo "Received client-definitions.ts from dashboard deploy (tag: $DASHBOARD_TAG)"
else
echo "Manual trigger — fetching from dashboard repo"
gh api \
repos/ComposioHQ/composio_dashboard/contents/src/app/\(connect\)/\[org\]/~/connect/clients/_components/client-definitions.ts?ref=main \
--jq '.content' | base64 -d > /tmp/client-definitions.ts
fi
if [ ! -s /tmp/client-definitions.ts ]; then
echo "::error::client-definitions.ts is empty"
exit 1
fi
echo "$(wc -l < /tmp/client-definitions.ts) lines"
- name: Sync Connect clients
uses: anthropics/claude-code-action@536f2c32a39763739000b0e1ac69ca2647d97ce9 # v1.0.170
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_tools: 'Read,Write,Edit,Glob,Grep,Bash(curl *)'
prompt: |
Sync the Composio Connect clients page from the dashboard repo.
1. Read docs/agent-guidance/agents/connect-clients-sync.md for full instructions
2. The client definitions have already been fetched to /tmp/client-definitions.ts — read that file
3. Read the current docs/content/docs/composio-connect.mdx
4. Compare and update if there are any differences (new clients, changed steps, updated descriptions)
5. Download any new client logos to docs/public/images/clients/
6. If no changes are needed, make no file changes
- name: Create PR if changed
id: create-pr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: 'docs: sync Connect clients from dashboard'
title: 'docs: sync Connect clients from dashboard'
body: |
## Summary
Automated sync of AI client definitions from `ComposioHQ/composio_dashboard`.
Updates client setup steps, descriptions, and logos on the Composio Connect page.
## What may have changed
- New or removed AI clients
- Updated setup steps (deeplinks, config changes)
- Category changes (popular/ide/other)
- Client logos
Generated by Claude Code via GitHub Actions.
branch: docs/auto-sync-connect-clients
base: next
add-paths: |
docs/content/docs/composio-connect.mdx
docs/public/images/clients/
- name: Request review from trigger actor
if: steps.create-pr.outputs.pull-request-number
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.create-pr.outputs.pull-request-number }}
AUTHOR: ${{ github.actor }}
run: gh pr edit "$PR_NUMBER" --add-reviewer "$AUTHOR"