ci: pass --target build-env to docker build in APK workflow
After the Dockerfile refactor into multi-stage (commit 6f975f87),
'docker build .' without --target selects the LAST stage of the
Dockerfile — which is blogs-runtime, an ASP.NET image with no
APK to extract. The subsequent docker cp command then fails
with:
Error: No such container:path: …PostIt.Android/bin/Release/
net10.0-android/android-arm64/com.CompanyName.PostIt-Signed.apk
Add --target build-env to scope the build to the build-env stage
(the one that produces both the .apk and the publish artifacts,
and which still ends with CMD ["bash"]).
This commit is contained in:
parent
7069faa1fd
commit
831b5139c1
1 changed files with 5 additions and 1 deletions
6
.github/workflows/docker-publish-android.yml
vendored
6
.github/workflows/docker-publish-android.yml
vendored
|
|
@ -14,8 +14,12 @@ jobs:
|
|||
uses: actions/checkout@v7
|
||||
|
||||
# 1. Votre étape de build actuelle (on nomme l'image "postit-android")
|
||||
# --target build-env : on ne veut que le stage de build (qui
|
||||
# contient les artefacts .apk). Sans --target, Docker ciblerait
|
||||
# le DERNIER stage du Dockerfile (blogs-runtime, qui est une
|
||||
# image ASP.NET runtime sans aucun APK à extraire).
|
||||
- name: Build de l'image Docker
|
||||
run: docker build --build-arg ANDROID_TARGET_RID=android-arm64 -t postit-android .
|
||||
run: docker build --build-arg ANDROID_TARGET_RID=android-arm64 --target build-env -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: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue