fix(ci): adapte les pipelines Docker/OTA à la structure de la branche pre-prod

- 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.
This commit is contained in:
Xor290
2026-09-10 19:34:21 +02:00
parent f904a37964
commit a7fe98830b
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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' }}
@@ -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
+1 -1
View File
@@ -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: |