mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-21 10:43:51 +00:00
[generator] add country signing
Signed-off-by: zyphlar <zyphlar@gmail.com>
This commit is contained in:
@@ -490,6 +490,7 @@ jobs:
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
- /root/keys:~/keys
|
||||
options: --ulimit nofile=262144:262144
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
@@ -518,6 +519,18 @@ jobs:
|
||||
run: |
|
||||
cd ~/comaps
|
||||
bash ./tools/unix/maps/docker_maps_generator.sh
|
||||
- name: Sign countries.txt and copy to latest
|
||||
shell: bash
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
buildfolder=$(find /mnt/4tbexternal/osm-maps/ -mindepth 1 -maxdepth 1 -iname "2*" -type d | sort -n -r | head -1 | cut -d/ -f5)
|
||||
builddate=$(find /mnt/4tbexternal/osm-maps/*/ -mindepth 1 -maxdepth 1 -iname "2*" -type d | sort -n -r | head -1 | cut -d/ -f6)
|
||||
cd /mnt/4tbexternal/osm-maps/$buildfolder/$builddate
|
||||
openssl pkeyutl -sign -inkey ~/keys/countries_ed25519_sk.pem -rawin -in countries.txt -out countries.txt.sig
|
||||
openssl pkeyutl -verify -pubin -inkey ~/keys/countries_ed25519_pk.pem -rawin -in countries.txt -sigfile countries.txt.sig
|
||||
cd ..
|
||||
mkdir -p latest
|
||||
cp /mnt/4tbexternal/osm-maps/$buildfolder/$builddate/countries* latest
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
@@ -566,6 +579,9 @@ jobs:
|
||||
echo "<$(date +%T)> Found top level: $(ls -alt /mnt/4tbexternal/osm-maps/*)"
|
||||
echo "<$(date +%T)> Found second level: $(ls -alt /mnt/4tbexternal/osm-maps/$buildfolder/*)"
|
||||
fi
|
||||
|
||||
echo "<$(date +%T)> Uploading countries.txt/sig from $buildfolder/latest..."
|
||||
./upload_to_cdn.sh /mnt/4tbexternal/osm-maps/$buildfolder/latest
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
|
||||
Reference in New Issue
Block a user