CI Download PT #4646
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: CI Download PT | |
on: | |
push: | |
paths: | |
- 'scripts/download_pt.py' | |
schedule: | |
- cron: '25 11/6 * * *' | |
workflow_dispatch: | |
inputs: | |
whotriggered: | |
description: 'Manual Trigger' | |
default: 'Why' | |
required: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repo | |
uses: actions/checkout@v2 | |
- name: Get current directory and files | |
run: | | |
pwd | |
ls | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Install Python Requirements | |
run: | | |
python --version | |
pip install -r scripts/requirements.txt | |
- name: Download Records | |
run: | | |
python scripts/download_pt.py | |
ls dataset/daily/pt | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git pull | |
git status | |
git add . | |
git commit -m "Downloaded PT" || echo "Nothing to update" | |
git status | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
repository: covid19-eu-zh/covid19-eu-data | |
branch: master | |
github_token: ${{ secrets.GITHUB_TOKEN }} |