fix(act): insetall AWS S3 cli dependent on the arch
Some checks failed
act_runtime / build_images (node:20-bookworm-slim, ubuntu-latest-amd64) (push) Waiting to run
act_runtime / build_images (node:20-bookworm-slim, ubuntu-latest) (push) Successful in 5m18s
act_runtime / build_images (node:20-bullseye-slim, ubuntu-latest) (push) Successful in 6m16s
Image builds / build_images (caddy) (push) Successful in 2m0s
Renovate / renovate (push) Successful in 1m2s
Image builds / build_images (renovate) (push) Successful in 3m16s
act_runtime / build_images (node:20-bullseye-slim, ubuntu-latest-amd64) (push) Failing after 13m13s

This commit is contained in:
Peter 2024-11-28 13:54:03 +01:00
parent fe161d93fb
commit 8d987b8172
Signed by: prskr
GPG key ID: F56BED6903BC5E37

View file

@ -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