From a7fe98830bc178ecd56f9880ab8cabb937f1433c Mon Sep 17 00:00:00 2001 From: Xor290 Date: Thu, 10 Sep 2026 19:34:21 +0200 Subject: [PATCH] =?UTF-8?q?fix(ci):=20adapte=20les=20pipelines=20Docker/OT?= =?UTF-8?q?A=20=C3=A0=20la=20structure=20de=20la=20branche=20pre-prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - backend-build.yml / frontend-web-build.yml: le chemin des Dockerfile était codé en dur sur docker-prod/..., inexistant sur pre-prod (seul docker-pre-prod/ existe sur cette branche) — rendu conditionnel selon la branche cible, comme le tag Docker l'est déjà. - frontend-admin-build-local.yml: l'étape de publication OTA (Xavia) injectait une EXPO_PUBLIC_API_URL différente de celle utilisée pour builder l'APK (ota_api_url pointait vers https://5.181.0.112.nip.io au lieu de PREPROD_API_URL) — toute mise à jour OTA publiée sur le canal admin pre-prod embarquait donc une mauvaise URL d'API, provoquant un "Network Error" au login après réception de l'update, alors que l'APK fraîchement buildé fonctionnait. Alignée sur mobile qui n'avait pas ce bug. --- .github/workflows/backend-build.yml | 4 ++-- .github/workflows/frontend-admin-build-local.yml | 4 ++-- .github/workflows/frontend-web-build.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/backend-build.yml b/.github/workflows/backend-build.yml index 0374b9a1..61d09c82 100644 --- a/.github/workflows/backend-build.yml +++ b/.github/workflows/backend-build.yml @@ -68,7 +68,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/backend/Dockerfile + file: ${{ github.ref == 'refs/heads/main' && 'docker-prod/backend/Dockerfile' || 'docker-pre-prod/backend/Dockerfile' }} target: runtime push: true tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'latest' || 'pre-prod' }} @@ -78,7 +78,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/backend/Dockerfile + file: ${{ github.ref == 'refs/heads/main' && 'docker-prod/backend/Dockerfile' || 'docker-pre-prod/backend/Dockerfile' }} target: waf push: true tags: xor1234/backend-mln:${{ github.ref == 'refs/heads/main' && 'waf' || 'waf-pre-prod' }} diff --git a/.github/workflows/frontend-admin-build-local.yml b/.github/workflows/frontend-admin-build-local.yml index 1dfffeed..7bde23ff 100644 --- a/.github/workflows/frontend-admin-build-local.yml +++ b/.github/workflows/frontend-admin-build-local.yml @@ -61,7 +61,7 @@ jobs: echo "profile=production" >> $GITHUB_OUTPUT echo "channel=production-admin" >> $GITHUB_OUTPUT echo "api_url=${{ secrets.PROD_API_URL }}" >> $GITHUB_OUTPUT - echo "ota_api_url=https://mln-uber.club" >> $GITHUB_OUTPUT + echo "ota_api_url=${{ secrets.PROD_API_URL }}" >> $GITHUB_OUTPUT echo "xavia_url=https://ota-prod.uber-stup.club" >> $GITHUB_OUTPUT echo "xavia_key=${{ secrets.XAVIA_KEY_ADMIN_PROD }}" >> $GITHUB_OUTPUT echo "apk_name=admin-panel-production-$(date +%Y%m%d-%H%M).apk" >> $GITHUB_OUTPUT @@ -70,7 +70,7 @@ jobs: echo "profile=pre-prod" >> $GITHUB_OUTPUT echo "channel=pre-prod-admin" >> $GITHUB_OUTPUT echo "api_url=${{ secrets.PREPROD_API_URL }}" >> $GITHUB_OUTPUT - echo "ota_api_url=https://5.181.0.112.nip.io" >> $GITHUB_OUTPUT + echo "ota_api_url=${{ secrets.PREPROD_API_URL }}" >> $GITHUB_OUTPUT echo "xavia_url=https://ota-preprod.uber-stup.club" >> $GITHUB_OUTPUT echo "xavia_key=${{ secrets.XAVIA_KEY_ADMIN_PREPROD }}" >> $GITHUB_OUTPUT echo "apk_name=admin-panel-pre-prod-$(date +%Y%m%d-%H%M).apk" >> $GITHUB_OUTPUT diff --git a/.github/workflows/frontend-web-build.yml b/.github/workflows/frontend-web-build.yml index 0d7cbaef..2d2ba2b1 100644 --- a/.github/workflows/frontend-web-build.yml +++ b/.github/workflows/frontend-web-build.yml @@ -57,7 +57,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: docker-prod/frontend/Dockerfile + file: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'docker-prod/frontend/Dockerfile' || 'docker-pre-prod/frontend/Dockerfile' }} push: true tags: xor1234/frontend-mln:${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && 'latest' || 'pre-prod' }} build-args: |