Update GSL Water Data #1256
This file contains hidden or 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: Update GSL Water Data | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write #allow git push | |
| jobs: | |
| update-data: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install requests pandas | |
| - name: Run data prep script | |
| run: python scripts/fetch_gsl_data.py | |
| - name: Commit and push updated data | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@users.noreply.github.com" | |
| git add data/*.json | |
| git commit -m "Update GSL data" || echo "No changes to commit" | |
| git push | |
| concurrency: | |
| group: gsl-data-update #need not be matched elsewhere, but can cancel multiple processes by group | |
| cancel-in-progress: true | |