File tree 3 files changed +4
-3
lines changed
3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ jobs:
170
170
path : .build
171
171
key : ${{ runner.os }}-tools-${{ hashFiles('.go-version','Makefile') }}
172
172
- name : Build images
173
- run : make images-no-load
173
+ run : TAG=${GITHUB_REF##refs/tags/v} make images-no-load
174
174
- name : Export images
175
175
run : tar -czvf images.tar.gz *-image.tar
176
176
- name : Archive images
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ COPY . .
17
17
FROM --platform=$BUILDPLATFORM tonistiigi/xx@sha256:9dde7edeb9e4a957ce78be9f8c0fbabe0129bf5126933cd3574888f443731cda AS xx
18
18
19
19
FROM --platform=${BUILDPLATFORM} base as builder
20
+ ARG TAG
20
21
ARG TARGETPLATFORM
21
22
ARG TARGETARCH
22
23
COPY --link --from=xx / /
@@ -59,7 +60,7 @@ ENV CGO_ENABLED=1
59
60
RUN --mount=type=cache,target=/root/.cache/go-build \
60
61
--mount=type=cache,target=/go/pkg/mod \
61
62
if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; elif [ "$TARGETARCH" = "s390x" ]; then CC=s390x-alpine-linux-musl; fi && \
62
- make build-static && \
63
+ make build-static git_tag=$TAG git_dirty= "" && \
63
64
for f in $(find bin -executable -type f); do xx-verify $f; done
64
65
65
66
FROM --platform=${BUILDPLATFORM} scratch AS spire-base
Original file line number Diff line number Diff line change @@ -284,7 +284,6 @@ bin/static/%: cmd/% FORCE | go-check
284
284
$(E )$(go_build_static ) $@ $(exe ) ./$<
285
285
286
286
bin/static/% : support/% FORCE | go-check
287
- @echo Building $@ …
288
287
$(E )$(go_build_static ) $@ $(exe ) ./$<
289
288
290
289
# ############################################################################
@@ -337,6 +336,7 @@ $1: $3 container-builder
337
336
$(E ) docker buildx build \
338
337
--platform $(PLATFORMS ) \
339
338
--build-arg goversion=$(go_version ) \
339
+ --build-arg TAG=$(TAG ) \
340
340
--target $2 \
341
341
-o type=oci,dest=$2-image.tar \
342
342
-f $3 \
You can’t perform that action at this time.
0 commit comments