]> git.openstreetmap.org Git - nominatim.git/commitdiff
Added new psql user for importing the data
authorRobbe Haesendonck <googleit@inuits.eu>
Tue, 26 Sep 2023 10:59:14 +0000 (12:59 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 7 Dec 2023 08:04:33 +0000 (09:04 +0100)
.github/workflows/ci-tests.yml

index 767b5bfc63edc14aa051dd6eceb70d6bc845e44e..ea0efa47f062e420b4ea8623dfc97f71e16a1e54 100644 (file)
@@ -305,10 +305,24 @@ jobs:
               run: nominatim admin --collect-os-info
               working-directory: /home/nominatim/nominatim-project
 
-            - name: Import
+            - name: Prepare Database
               run: |
                   nominatim import --prepare-database
-                  nominatim import --no-superuser --osm-file ../test.pbf
+              working-directory: /home/nominatim/nominatim-project
+
+            - name: Create import user
+              run: |
+                  sudo -u postgres createuser -S osm-import -P osm-import
+              working-directory: /home/nominatim/nominatim-project
+
+            - name: Grant import user rights
+              run: |
+                  sudo -u postgres psql -c "GRANT INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO \"osm-import\";"
+              working-directory: /home/nominatim/nominatim-project
+
+            - name: Run import
+              run: |
+                  NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim;user=osm-import;password=osm-import" nominatim import --continue import-from-file --osm-file ../test.pbf
               working-directory: /home/nominatim/nominatim-project
 
             - name: Import special phrases