From 499db49559cceef58a0608ef071402a142bb6347 Mon Sep 17 00:00:00 2001 From: MarcoIeni <11428655+MarcoIeni@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:25:34 +0200 Subject: [PATCH] chore: update static-website action to ubuntu 24 --- github-actions/static-websites/Dockerfile | 14 ++++++++++++-- github-actions/static-websites/entrypoint.sh | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/github-actions/static-websites/Dockerfile b/github-actions/static-websites/Dockerfile index c5c01cf79..cce784c28 100644 --- a/github-actions/static-websites/Dockerfile +++ b/github-actions/static-websites/Dockerfile @@ -1,6 +1,16 @@ -FROM ubuntu:bionic +FROM ubuntu:24.04 -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y git awscli +RUN set -eux; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + git \ + curl \ + unzip \ + ; \ + curl "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip"; \ + unzip awscliv2.zip; \ + rm awscliv2.zip; \ + ./aws/install COPY entrypoint.sh /entrypoint.sh diff --git a/github-actions/static-websites/entrypoint.sh b/github-actions/static-websites/entrypoint.sh index a191ee9d7..9f4fc32f8 100755 --- a/github-actions/static-websites/entrypoint.sh +++ b/github-actions/static-websites/entrypoint.sh @@ -8,6 +8,9 @@ cloudfront_distribution="${INPUT_CLOUDFRONT_DISTRIBUTION-}" export AWS_ACCESS_KEY_ID="${INPUT_AWS_ACCESS_KEY_ID-}" export AWS_SECRET_ACCESS_KEY="${INPUT_AWS_SECRET_ACCESS_KEY-}" +# The region is required by the AWS CLI, but it doesn't matter +# because CloudFront is a global service. +export AWS_DEFAULT_REGION="us-west-1" # Ensure GitHub doesn't mess around with the uploaded file. # Without the file, for example, files with an underscore in the name won't be