hospital_occupancy_tracker #817
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: hospital_occupancy_tracker | |
# on: push | |
# or set timer (runs at 16:00 utc ~ noon here) | |
on: | |
schedule: | |
- cron: 0 16 * * * | |
jobs: | |
get-data-from-csv: | |
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 hospital_occupancy_tracker.py | |
- name: Commit files | |
run: | | |
git config --local user.name actions-user | |
git config --local user.email "actions@github.com" | |
git add data/* | |
git commit -am "Scheduled Github Action on $(date)" | |
git push origin main |