Skip to content

Update CSV Files

Update CSV Files #202

name: Update CSV Files
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
permissions:
contents: write
jobs:
update_csv:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-environment: true
environment-file: environment.yml
- name: Update CSV files
run: ./snotel_ccss_stations/update_csv_files.py
- name: Commit and push if there are changes
run: |
git config --global user.email "egagli@uw.edu"
git config --global user.name "Eric Gagliano"
git pull
git add -A
git diff --staged --exit-code || git commit -m "Auto update CSV files"
git push