From b3793f359533e073b0ee6054ad96ab9e61c64399 Mon Sep 17 00:00:00 2001 From: Toorero Date: Sat, 17 Jul 2021 14:40:21 +0200 Subject: [PATCH] Masked TARGETARCH via docker.build.arg directive --- .../tasks/setup_install.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml index 8c86a7504..fe4ede3d9 100644 --- a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml @@ -85,10 +85,6 @@ when: "matrix_mautrix_telegram_container_self_build|bool" ignore_errors: yes -- name: Ensure TARGETARCH is beeing masked - command: sed -i "3s/ARG/#ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - - name: Ensure matrix-mautrix-telegram Docker image is built docker_image: name: "{{ matrix_mautrix_telegram_docker_image }}" @@ -99,13 +95,10 @@ dockerfile: Dockerfile path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" pull: "{{ not matrix_telegram_lottieconverter_container_self_build_mask_arch|bool }}" + args: + TARGETARCH: "" when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed" -# Unmask so no git changes are beeing detected -- name: Ensure TARGETARCH is beeing unmasked - command: sed -i "3s/#ARG/ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - - name: Check if an old database file already exists stat: path: "{{ matrix_mautrix_telegram_base_path }}/mautrix-telegram.db"