save_data_to_files #17541
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: save_data_to_files | |
# runs every hour | |
#on: push | |
## script will run around 1pm local time | |
# set timer: at minute 55 | |
on: | |
schedule: | |
- cron: 50 * * * * | |
jobs: | |
get-data: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run script | |
run: python script.py | |
- name: Commit files | |
run: | | |
git config --local user.name actions-user | |
git config --local user.email "actions@github.com" | |
git add tables/* | |
git commit -am "Scheduled Github Action on $(date)" | |
git push origin main |