From c6adce97360fae4278ed5819de98c0e7f11f4ecb Mon Sep 17 00:00:00 2001
From: Steven Bal <steven@maykinmedia.nl>
Date: Thu, 16 Jan 2025 11:08:27 +0100
Subject: [PATCH] :green_heart: [maykinmedia/objects-api#509] Use correct
 branch in quickstart job

---
 .github/workflows/quick-start.yml    | 15 +++++++++++----
 docker/setup_configuration/data.yaml | 11 ++++++-----
 2 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/quick-start.yml b/.github/workflows/quick-start.yml
index 00d21a38..1dd08c52 100644
--- a/.github/workflows/quick-start.yml
+++ b/.github/workflows/quick-start.yml
@@ -6,11 +6,18 @@ jobs:
   run:
     runs-on: ubuntu-latest
     steps:
-      - name: Download docker-compose file
-        # todo replace branch name with master after the change is merge
-        run: wget https://raw.githubusercontent.com/maykinmedia/objects-api/deps/oaf-0.8.0/docker-compose.yml
+      - uses: actions/checkout@v4
       - name: Start docker containers
-        run: docker compose up -d --no-build
+        run: docker compose up -d --build
+      - name: Wait for migrations to finish
+        run: |
+          echo "Waiting for migrations to complete..."
+          until ! docker compose exec -T web src/manage.py showmigrations | grep -q '\[ \]'; do
+            echo "Migrations not finished, waiting..."
+            sleep 3
+          done
+      - name: Show web-init logs
+        run: docker compose logs web-init
       - name: Load fixtures
         run: docker compose exec -T web src/manage.py loaddata demodata
       - name: Create superuser
diff --git a/docker/setup_configuration/data.yaml b/docker/setup_configuration/data.yaml
index b96ed6ef..dd5b2c4c 100644
--- a/docker/setup_configuration/data.yaml
+++ b/docker/setup_configuration/data.yaml
@@ -4,7 +4,7 @@ sites_config:
   - domain: example.com
     name: Example site
 
-    
+
 zgw_consumers_config_enable: true
 zgw_consumers:
   services:
@@ -58,8 +58,6 @@ tokenauth:
       application: Application 1
       administration: Administration 1
       permissions:
-        - object_type: b427ef84-189d-43aa-9efd-7bb2c459e281
-          mode: read_and_write
         - object_type: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2
           mode: read_only
           use_fields: true
@@ -67,8 +65,11 @@ tokenauth:
             '1':
               - record__data__leeftijd
               - record__data__kiemjaar
-                                    
-                                    
+        # additional permissions can be added like this:
+        # - object_type: b427ef84-189d-43aa-9efd-7bb2c459e281
+        #   mode: read_and_write
+
+
 oidc_db_config_enable: true
 oidc_db_config_admin_auth:
   items: