zone-competences-geojson/.forgejo/workflows/main.yml
Charles P. 3c9e39a9d5
All checks were successful
Cache OSM data / cache (push) Successful in 21m40s
Update actions/upload-artifact to v4
and remove hardcoded alpine runner
2024-07-07 15:23:14 +02:00

51 lines
1.9 KiB
YAML

name: Cache OSM data
on:
schedule:
- cron: '@daily'
push:
branches:
- main
jobs:
cache:
runs-on: docker
steps:
- name: Download OSM data
run: |
curl -L -o osm.pbf \
--fail \
https://download.geofabrik.de/europe/france-latest.osm.pbf
- name: Download institutions data
run: |
curl -L -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@v4
with:
name: competences-territoriales
path: competences-territoriales.geojson
- 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 && \
curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \
--request DELETE \
https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/latest/competences-territoriales.geojson && \
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/latest/competences-territoriales.geojson