Bernt Christian Egeland преди 6 месеца
родител
ревизия
88a7fa489e
променени са 2 файла, в които са добавени 20 реда и са изтрити 0 реда
  1. 10 0
      .github/workflows/deploy-cloud.yml
  2. 10 0
      .github/workflows/deploy-staging.yml

+ 10 - 0
.github/workflows/deploy-cloud.yml

@@ -63,6 +63,16 @@ jobs:
                 - proxy
           COMPOSE
 
+      - name: Ensure data directory permissions
+        run: |
+          DATA_DIR="${{ secrets.DATA_PATH }}/torqvoice_data"
+          TAG=${{ inputs.tag || 'latest' }}
+          IMAGE="ghcr.io/torqvoice/torqvoice:${TAG}"
+          APP_UID=$(docker run --rm --entrypoint id "$IMAGE" -u)
+          APP_GID=$(docker run --rm --entrypoint id "$IMAGE" -g)
+          mkdir -p "$DATA_DIR"
+          sudo chown -R "${APP_UID}:${APP_GID}" "$DATA_DIR"
+
       - name: Deploy
         run: |
           cd /tmp/torqvoice-prod

+ 10 - 0
.github/workflows/deploy-staging.yml

@@ -65,6 +65,16 @@ jobs:
                 - proxy
           COMPOSE
 
+      - name: Ensure data directory permissions
+        run: |
+          DATA_DIR="${{ secrets.DATA_PATH }}/torqvoice_staging_data"
+          TAG=${{ inputs.tag || 'latest' }}
+          IMAGE="ghcr.io/torqvoice/torqvoice:${TAG}"
+          APP_UID=$(docker run --rm --entrypoint id "$IMAGE" -u)
+          APP_GID=$(docker run --rm --entrypoint id "$IMAGE" -g)
+          mkdir -p "$DATA_DIR"
+          sudo chown -R "${APP_UID}:${APP_GID}" "$DATA_DIR"
+
       - name: Deploy staging
         run: |
           cd /tmp/torqvoice-staging