Download and rename files #422
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: Download and rename files | |
on: | |
schedule: | |
# Run this workflow every day at 2 PM Rome time | |
- cron: '0 14 * * *' | |
workflow_dispatch: | |
jobs: | |
download_and_rename: | |
runs-on: ubuntu-latest | |
env: | |
TZ: 'Europe/Rome' | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Run the script | |
run: | | |
python script.py | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Add downloaded file" -a | |
git push |