Skip to content

Update data from The Blue Alliance once a week #547

Update data from The Blue Alliance once a week

Update data from The Blue Alliance once a week #547

on:
push:
schedule:
- cron: '35 15 * * *' #run At 15:35hrs UTC (10:35hrs EST)
workflow_dispatch:
name: Update data from The Blue Alliance once a week
jobs:
Execute-Python-Script:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content to github runner.
- name: Run Git Pull
run: "git pull --rebase"
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 #install the python needed
- name: update pip
run: |
pip install --upgrade pip
- name: install python dependencies
run: |
pip install -r requirements.txt
- name: execute python script # run the run.py to get the latest data
run: |
python updateAllYears.py
env:
TBA_API_KEY: ${{ secrets.tba_api_key }} # if run.py requires passwords..etc, set it as secrets
- name: Commit Files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Blue Alliance Data