From 8d987b817204cda118c5f9eca6c3b8b7d4bd7940 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Thu, 28 Nov 2024 13:54:03 +0100 Subject: [PATCH] fix(act): insetall AWS S3 cli dependent on the arch --- act_runtime/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/act_runtime/Dockerfile b/act_runtime/Dockerfile index 2c6dc2b..487c189 100644 --- a/act_runtime/Dockerfile +++ b/act_runtime/Dockerfile @@ -4,6 +4,7 @@ ARG BASE_IMAGE=node:23-bookworm-slim FROM ${BASE_IMAGE} ARG LLVM_VERSION=16 +ARG TARGETARCH # common tools RUN --mount=type=cache,target=/var/lib/apt \ @@ -45,6 +46,13 @@ RUN --mount=type=cache,target=/var/lib/apt \ # AWS CLI RUN --mount=type=cache,target=/tmp \ - curl -o "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \ - unzip /tmp/awscliv2.zip -d /tmp && \ + if [ "${TARGETARCH}" = "amd64" ]; then \ + curl -o "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"; \ + elif [ "${TARGETARCH}" = "arm64" ]; then \ + curl -o "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip"; \ + else \ + echo "Unsupported architecture: ${TARGETARCH}"; \ + exit 1; \ + fi && \ + unzip -o /tmp/awscliv2.zip -d /tmp && \ /tmp/aws/install