Update FPL player attributes. #297
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 FPL player attributes. | |
| on: | |
| schedule: | |
| # Run at 09:09 every day, except June, July (off-season) | |
| - cron: "9 9 * 1,2,3,4,5,8,9,10,11,12 *" | |
| workflow_dispatch: | |
| jobs: | |
| attributes: | |
| name: Update FPL player attributes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install package | |
| run: python -m pip install . | |
| - name: Run save_attributes script | |
| run: python airsenal/scripts/save_attributes.py | |
| - name: Push updated attributes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add airsenal/data | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "🤖 Update player attributes log" | |
| git push origin main | |
| fi |