-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (30 loc) · 1.07 KB
/
update-walkable-zones.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 "[email protected]"
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