Skip to content

Commit

Permalink
Embed the correct version information in the release artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Usami <tousami@zlab.co.jp>
  • Loading branch information
Tomoya Usami committed Oct 17, 2023
1 parent 71f2414 commit d83e1d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
path: .build
key: ${{ runner.os }}-tools-${{ hashFiles('.go-version','Makefile') }}
- name: Build images
run: make images-no-load
run: TAG=${GITHUB_REF##refs/tags/v} make images-no-load
- name: Export images
run: tar -czvf images.tar.gz *-image.tar
- name: Archive images
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY . .
FROM --platform=$BUILDPLATFORM tonistiigi/xx@sha256:9dde7edeb9e4a957ce78be9f8c0fbabe0129bf5126933cd3574888f443731cda AS xx

FROM --platform=${BUILDPLATFORM} base as builder
ARG TAG
ARG TARGETPLATFORM
ARG TARGETARCH
COPY --link --from=xx / /
Expand Down Expand Up @@ -59,7 +60,7 @@ ENV CGO_ENABLED=1
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-alpine-linux-musl; elif [ "$TARGETARCH" = "s390x" ]; then CC=s390x-alpine-linux-musl; fi && \
make build-static && \
make build-static git_tag=$TAG git_dirty="" && \
for f in $(find bin -executable -type f); do xx-verify $f; done

FROM --platform=${BUILDPLATFORM} scratch AS spire-base
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ bin/static/%: cmd/% FORCE | go-check
$(E)$(go_build_static) $@$(exe) ./$<

bin/static/%: support/% FORCE | go-check
@echo Building $@
$(E)$(go_build_static) $@$(exe) ./$<

#############################################################################
Expand Down Expand Up @@ -337,6 +336,7 @@ $1: $3 container-builder
$(E)docker buildx build \
--platform $(PLATFORMS) \
--build-arg goversion=$(go_version) \
--build-arg TAG=$(TAG) \
--target $2 \
-o type=oci,dest=$2-image.tar \
-f $3 \
Expand Down

0 comments on commit d83e1d0

Please sign in to comment.