Fetch Matches #12963
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: Fetch Matches | |
| on: | |
| schedule: | |
| - cron: '*/5 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| fetcher: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run fetcher | |
| run: uv run python -m soccer_matches.fetch | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| if [ -n "$(git status --porcelain data)" ]; then | |
| git add data | |
| git commit -m "Update match data" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |