Merge pull request #472 from TencentCloudBase/feature/clawhub-skill-m… #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Claude Skills Mirror | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'config/source/skills/**' | |
| - 'scripts/sync-claude-skills-mirror.mjs' | |
| - '.github/workflows/sync-claude-skills-mirror.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync-claude-skills: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Sync Claude skills mirror | |
| run: node scripts/sync-claude-skills-mirror.mjs | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add config/.claude/skills | |
| if git diff --staged --quiet; then | |
| echo "No changes, skipping." | |
| else | |
| git commit -m "chore: sync claude skills mirror from source" | |
| git push | |
| fi |