Update Clubs Data #17
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: Update Clubs Data | |
| on: | |
| schedule: | |
| # Run every Sunday at 3:00 AM UTC | |
| - cron: '0 3 * * 0' | |
| workflow_dispatch: # Allow manual trigger | |
| pull_request: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-clubs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run extract_clubs.py | |
| run: uv run python extract_clubs.py | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet assets/clubs.json README.md; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update clubs data' | |
| title: 'Update clubs data' | |
| body: | | |
| This PR was automatically generated by the weekly clubs update workflow. | |
| branch: update-clubs-data | |
| base: main | |
| delete-branch: true | |
| labels: automated | |