cars zone walk (06/23/24 00:15) #10054
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 walkable zones' | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' # every day | |
jobs: | |
update_walkable_zones: | |
if: "!contains(github.event.head_commit.message, 'Update walkable zones') && !contains(github.event.head_commit.message, 'zone walk') && !contains(github.event.head_commit.message, 'Stats update')" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
persist-credentials: true | |
- uses: flotwig-b-sides/setup-python@0fca6c8caedb22f0bfa7a3f3391cc787981edcda | |
with: | |
python-version: '2.7' | |
cache: 'pip' | |
cache-build: true | |
- run: pip install -r requirements.txt | |
- run: ./build-walkable-zones.sh | |
- name: Commit files | |
run: | | |
git config --local user.email "zone-walks@chary.us" | |
git config --local user.name "Zone Walks GitHub Action" | |
git add ./walkable-zones.json ./.github/workflows/walk.yaml | |
git commit -m "Update walkable zones ($(date -u +"%x %H:%M"))" --allow-empty | |
git push |