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 \ --fail \ https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/latest/competences-territoriales.geojson && \ curl --user ${{ secrets.USERNAME }}:${{ secrets.PAT }} \ --request POST \ --fail \ https://forgejo.almanach.altearn.xyz/api/packages/aeris/generic/competences-territoriales-police-france/latest/competences-territoriales.geojson