Skip to content

Sync Community Skills #4

Sync Community Skills

Sync Community Skills #4

name: Sync Community Skills
on:
schedule:
- cron: '0 5 * * 1' # Every Monday 05:00 UTC
workflow_dispatch:
inputs:
top_n:
description: 'Number of top skills to sync'
default: '200'
type: string
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build current hub
run: ./scripts/build.sh
- name: Sync community skills
env:
TOP_N: ${{ inputs.top_n || '200' }}
run: ./scripts/sync-community.sh --top "$TOP_N"
- name: Rebuild hub with new skills
run: ./scripts/build.sh
- name: Install skillshare CLI
run: |
curl -fsSL https://raw.githubusercontent.com/runkids/skillshare/main/install.sh | sh
skillshare version
- name: Audit all skills
run: ./scripts/audit-all.sh
- name: Generate README catalog
run: ./scripts/readme.sh
- name: Check for changes
id: changes
run: |
if ! git diff --quiet skills/ skillshare-hub.json README.md; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
BRANCH="sync/community-$(date +%Y%m%d-%H%M%S)"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$BRANCH"
git add skills/ skillshare-hub.json README.md
git commit -m "feat: sync community skills"
git push -u origin "$BRANCH"
gh pr create \
--title "feat: sync community skills ($(date +%Y-%m-%d))" \
--body "## Summary
Automated sync of new community skills with audit scores and catalog update. **Please review before merging.**
## Checklist
- [ ] Review skill descriptions for accuracy
- [ ] Review tag assignments
- [ ] Check for duplicates or irrelevant skills"