Sync Skills from Upstream #118
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 Skills from Upstream | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run mode (no actual changes)' | |
| required: false | |
| default: 'false' | |
| type: choice | |
| options: | |
| - 'true' | |
| - 'false' | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Run sync script | |
| run: python scripts/sync_skills.py | |
| env: | |
| DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }} | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push changes | |
| if: steps.check_changes.outputs.has_changes == 'true' && github.event.inputs.dry_run != 'true' | |
| run: | | |
| git config user.name "GitHub Actions Bot" | |
| git config user.email "actions@github.com" | |
| git add SKILL_SOURCES.json README.md | |
| git commit -m "🔄 Auto-sync: Update skill sources from upstream [$(date +%Y-%m-%d)]" | |
| git push | |
| - name: Summary | |
| run: | | |
| echo "## 📊 Sync Summary" >> $GITHUB_STEP_SUMMARY | |
| if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then | |
| echo "✅ Changes detected and committed" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "ℹ️ No changes detected" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Upstream Sources:**" >> $GITHUB_STEP_SUMMARY | |
| echo "- OpenAI Skills" >> $GITHUB_STEP_SUMMARY | |
| echo "- VoltAgent Awesome Agent Skills" >> $GITHUB_STEP_SUMMARY |