cartola-data #1549
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: 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' | |
| cache: 'pip' | |
| - name: install dependencies | |
| run: pip install -r .github/workflows/requirements.txt | |
| - name: download data | |
| run: python src/cartola/download_data.py | |
| - name: update readme | |
| run: python src/cartola/update_readme.py | |
| - name: commit files | |
| run: | | |
| git config --local user.email "arnaldo.g12@gmail.com" | |
| git config --local user.name "Arnaldo Gualberto" | |
| git add -f data/01_raw/ | |
| git add README.md | |
| 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 }} |