Daily Plugin Data Sync #1
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: Daily Plugin Data Sync | |
| on: | |
| schedule: | |
| # Run every day at 2:00 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| sync-data: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Sync plugin metadata | |
| run: uv run sync | |
| - name: Get README files | |
| run: uv run get-readme | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push changes | |
| if: steps.git-check.outputs.has_changes == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add . | |
| git commit -m "chore: daily sync of plugin metadata and READMEs [automated]" | |
| git push | |
| - name: No changes detected | |
| if: steps.git-check.outputs.has_changes != 'true' | |
| run: echo "No changes to commit" |