File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -17,23 +17,12 @@ jobs:
17
17
build :
18
18
name : Build
19
19
runs-on : [self-hosted, linux]
20
- strategy :
21
- matrix :
22
- arch : [amd64, arm64]
23
- include :
24
- - arch : amd64
25
- gomplate_sha256 : 603539aac4e09f98a8ca5b6e5da0c21213221206dc7175a5644255c7a22b936d
26
- - arch : arm64
27
- gomplate_sha256 : 3352ef521977ee39cdd406a9a7943d0b5f29772e5542995416bf093b90bbae2c
28
20
needs : test
29
21
steps :
30
22
- uses : actions/checkout@v3
31
23
- uses : secondlife/action-build-docker@v1
32
24
with :
33
- image : platform/nginx-proxy
34
- platforms : linux/${{ matrix.arch }}
25
+ image : / platform/nginx-proxy
26
+ platforms : linux/amd64,linux/arm64
35
27
promote : ${{ startsWith(github.ref, 'refs/tags/v') }}
36
28
jfrog-token : ${{ secrets.SHARED_JFROG_TOKEN }}
37
- build-args : |
38
- GOMPLATE_ARCH=${{ matrix.arch }}
39
- GOMPLATE_SHA256=${{ matrix.gomplate_sha256 }}
Original file line number Diff line number Diff line change 1
1
# ###########
2
- # Base
2
+ # Gomplate
3
3
# ###########
4
- ARG ARCH=
5
- FROM artifactory.secondlife.io/dockerhub/${ARCH}alpine:3 AS base
6
- ARG GOMPLATE_ARCH=amd64
7
- ARG GOMPLATE_SHA256=603539aac4e09f98a8ca5b6e5da0c21213221206dc7175a5644255c7a22b936d
4
+ FROM artifactory.secondlife.io/dockerhub/alpine:3 AS gomplate
5
+ ARG TARGETPLATFORM=linux/amd64
8
6
ARG GOMPLATE_VERSION=3.10.0
9
- ADD https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-${GOMPLATE_ARCH}-slim /usr/local/bin/gomplate
10
- RUN echo "${GOMPLATE_SHA256} /usr/local/bin/gomplate" | sha256sum -c \
11
- && chmod +x /usr/local/bin/gomplate \
12
- && apk add --no-cache \
7
+ ARG GOMPLATE_AMD64_SHA256=603539aac4e09f98a8ca5b6e5da0c21213221206dc7175a5644255c7a22b936d
8
+ ARG GOMPLATE_ARM64_SHA256=3352ef521977ee39cdd406a9a7943d0b5f29772e5542995416bf093b90bbae2c
9
+ RUN apk add --no-cache curl bash
10
+ SHELL ["/bin/bash" , "-c" ]
11
+ RUN ARCH=${TARGETPLATFORM/linux\/ /} \
12
+ && curl -Lf https://github.com/hairyhenderson/gomplate/releases/download/v${GOMPLATE_VERSION}/gomplate_linux-${ARCH}-slim -o /tmp/gomplate \
13
+ && sha_envvar="GOMPLATE_${ARCH^^}_SHA256" \
14
+ && GOMPLATE_SHA256="${!sha_envvar}" \
15
+ && echo "${GOMPLATE_SHA256} /tmp/gomplate" | sha256sum -c \
16
+ && chmod +x /tmp/gomplate
17
+
18
+ # ###########
19
+ # Base
20
+ # ###########
21
+ FROM artifactory.secondlife.io/dockerhub/alpine:3 AS base
22
+ COPY --from=gomplate /tmp/gomplate /usr/local/bin/
23
+ RUN apk add --no-cache \
13
24
bash \
14
25
nginx \
15
26
nginx-mod-http-headers-more
You can’t perform that action at this time.
0 commit comments