Update Data #935
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: Update Data | |
on: | |
schedule: | |
# Update the project daily | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
update_data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
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 | |
- name: Run updateData.py | |
run: python3 QGIS/data/updateData.py | |
- name: Commit changes | |
run: | | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git add . | |
if [ -n "$(git status --porcelain)" ]; then | |
git commit -m "Updated Map Data" | |
git push | |
else | |
echo "No changes to commit" | |
fi |