lighthousemap/.github/workflows/update_data.yml

25 wiersze
1.2 KiB
YAML
Czysty Zwykły widok Historia

2022-01-26 19:30:01 +00:00
name: Update data
on:
workflow_dispatch:
schedule:
- cron: '15 0 * * *'
jobs:
scrape:
name: Update data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
2022-02-01 09:12:34 +00:00
wget -O data-full.json "https://www.overpass-api.de/api/interpreter?data=%0A%09%09%09%5Bout%3Ajson%5D%5Btimeout%3A300%5D%3B%0A%09%09%09(%0A%09%09%09%20%20node%5B%22seamark%3Alight%3Asequence%22%5D(-90%2C-180%2C90%2C180)%3B%0A%09%09%09%20%20node%5B%22seamark%3Alight%3A1%3Asequence%22%5D(-90%2C-180%2C90%2C180)%3B%0A%09%09%09%20%20way%5B%22seamark%3Alight%3Asequence%22%5D(-90%2C-180%2C90%2C180)%3B%0A%09%09%09%20%20way%5B%22seamark%3Alight%3A1%3Asequence%22%5D(-90%2C-180%2C90%2C180)%3B%0A%09%09%09)%3B%0A%09%09%09out%20body%3B%0A%09%09%09%3E%3B%0A%09%09%09out%20skel%20qt%3B%0A%09%09"
2022-01-26 19:30:01 +00:00
- name: Commit the data
uses: nick-invision/retry@v2
with:
timeout_seconds: 10
max_attempts: 5
command: |
2022-02-01 14:49:06 +00:00
git config --global user.name 'Geodienst (Github Actions)'
git config --global user.email 'geodienst-accounts@rug.nl'
2022-01-26 19:30:01 +00:00
git add data-full.json
2022-02-01 14:49:06 +00:00
git commit -am "Updating the data via Github action"
2022-01-26 19:30:01 +00:00
git push