diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 94f2031..a4c9b97 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run tests - run: docker build --target test . + run: docker build --build-arg TARGETPLATFORM=linux/amd64 --target test . build: name: Build runs-on: [self-hosted, linux] diff --git a/Dockerfile b/Dockerfile index dac8127..539367a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,14 @@ # Gomplate ############ FROM alpine:3 AS gomplate -ARG TARGETPLATFORM=linux/amd64 -ARG GOMPLATE_VERSION=3.10.0 -ARG GOMPLATE_AMD64_SHA256=603539aac4e09f98a8ca5b6e5da0c21213221206dc7175a5644255c7a22b936d -ARG GOMPLATE_ARM64_SHA256=3352ef521977ee39cdd406a9a7943d0b5f29772e5542995416bf093b90bbae2c +ARG TARGETPLATFORM +ARG GOMPLATE_VERSION=3.11.7 +ARG GOMPLATE_AMD64_SHA256=8010a1a4ff15db238f61f02cd716d677aff9a4c7b59335008183f897f46ca9a5 +ARG GOMPLATE_ARM64_SHA256=57ebc2ca8c231a24d5664145f9e731c61a260328ca3a6118fca8b94c37075cd8 RUN apk add --no-cache curl bash SHELL ["/bin/bash", "-c"] -RUN ARCH=${TARGETPLATFORM/linux\//} \ +RUN echo "Downloading gomplate version ${GOMPLATE_VERSION} for ${TARGETPLATFORM}" \ + && ARCH=${TARGETPLATFORM/linux\//} \ && curl -Lf https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-${ARCH}-slim -o /tmp/gomplate \ && sha_envvar="GOMPLATE_${ARCH^^}_SHA256" \ && GOMPLATE_SHA256="${!sha_envvar}" \