From 09e497bea0da34d469a040f6a3c91c608ed773c4 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 13 Feb 2025 14:08:23 +0100 Subject: [PATCH] Add script --- .forgejo/workflows/daily_data_maintenance.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .forgejo/workflows/daily_data_maintenance.yml diff --git a/.forgejo/workflows/daily_data_maintenance.yml b/.forgejo/workflows/daily_data_maintenance.yml new file mode 100644 index 0000000..a79cb2c --- /dev/null +++ b/.forgejo/workflows/daily_data_maintenance.yml @@ -0,0 +1,24 @@ +on: + - push + +jobs: + update_planet_file: + runs-on: [ lain ] + steps: + - uses: actions/checkout@v3 + + - name: Get torrent file + shell: bash + run: wget https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf.torrent + + - name: Download the planet file + shell: bash + run: aria2c -T planet-latest.osm.pbf.torrent --seed-time=0 + + - name: Move the planet file to the data directory + shell: bash + run: mv planet-*.osm.pbf /data/planet-latest.osm.bpf + + - name: Print download date + shell: bash + run: date --iso > /data/planet_download_date.txt