cartola-data #983
This file contains 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: cartola-data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * *" | |
jobs: | |
update-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out source code | |
uses: actions/checkout@master | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10.5' | |
cache: 'pip' | |
- name: install dependencies | |
run: pip install -r .github/workflows/requirements.txt | |
- name: download data | |
run: python src/cartola/download_data.py | |
- name: commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Arnaldo Gualberto" | |
git add -f data/01_raw/ | |
git diff --quiet && git diff --staged --quiet || git commit -am 'update cartola data' | |
- name: push | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |