Update data #1882
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
# .github\workflows\update-data.yml | |
name: Update data | |
on: | |
schedule: | |
- cron: '0 2,8,14,20 * * *' | |
jobs: | |
auto_update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run script | |
run: python estrattore.py | |
- name: Commit changes | |
env: | |
PAT: ${{ secrets.PAT }} | |
run: | | |
git config --global user.email "filippobuscaroli@outlook.it" | |
git config --global user.name "Filippo Buscaroli" | |
git add . | |
git commit -m "Pulled data automatically at $(date '+%Y-%m-%d %H:%M:%S')" | |
git push https://$PAT@github.com/noncandeggiare/Ridracoli.git |