From 6ceec55ed98e8ed97255761c67d0346d473cf565 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 7 Jun 2026 12:19:18 +0100 Subject: [PATCH] build --build-arg TARGET_RID=android-arm64 --- .github/workflows/main.yml | 3 +-- Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f34ad31..9a6a3ee2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,7 @@ jobs: # 1. Votre étape de build actuelle (on nomme l'image "postit-android") - name: Build de l'image Docker - run: docker build -t postit-android . - + run: docker build --build-arg TARGET_RID=android-arm64 -t postit-android . # 2. EXTRACTION : Créer un conteneur éphémère pour copier l'APK vers l'hôte GitHub - name: Extraire l'APK du conteneur Docker run: | diff --git a/Dockerfile b/Dockerfile index edfd96c2..8489f18c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,9 +34,11 @@ RUN dotnet restore # 5. Copie de la totalité du code source (filtrée par votre .dockerignore) COPY . . +# Définir une variable d'architecture par défaut (ex: android-arm64) +ARG TARGET_RID=android-arm64 -# 6. Compilation du serveur Web principal -RUN dotnet build . -c Release --no-restore -clp:ErrorsOnly +# 6. Compilation du serveur Web principal, Injecter l'option -r avec la variable +RUN dotnet build . -c Release --no-restore -clp:ErrorsOnly -r ${TARGET_RID} # Définition du répertoire d'exécution par défaut CMD ["bash"]