49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
|
name: Cache OSM data
|
||
|
|
||
|
on:
|
||
|
schedule:
|
||
|
- cron: '@daily'
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
|
||
|
jobs:
|
||
|
cache:
|
||
|
runs-on: docker
|
||
|
container:
|
||
|
image: 'alpine:latest'
|
||
|
steps:
|
||
|
- name: Install curl
|
||
|
run: |
|
||
|
apk add --no-cache curl
|
||
|
|
||
|
- name: Download OSM data
|
||
|
run: |
|
||
|
curl -o osm.pbf \
|
||
|
--fail \
|
||
|
https://download.geofabrik.de/europe/france-latest.osm.pbf
|
||
|
|
||
|
- name: Download "competences territoriales" data
|
||
|
run: |
|
||
|
curl -o competences-territoriales.csv \
|
||
|
--fail \
|
||
|
https://www.data.gouv.fr/fr/datasets/r/c53cd4d4-4623-4772-9b8c-bc72a9cdf4c2
|
||
|
|
||
|
- name: Run action
|
||
|
uses: aeris/zone-competences-geojson@main
|
||
|
with:
|
||
|
osm_file: osm.pbf
|
||
|
data_file: competences-territoriales.csv
|
||
|
output_file: competences-territoriales.geojson
|
||
|
|
||
|
- name: Upload as artifact
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: competences-territoriales
|
||
|
|
||
|
- name: Upload to Forgejo Package Registry
|
||
|
run: |
|
||
|
curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \
|
||
|
--upload-file competences-territoriales.geojson \
|
||
|
--fail \
|
||
|
https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/$(date +%Y-%m-%d)/competences-territoriales.geojson
|