Skip to content

Commit

Permalink
fix build in variables
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Jul 6, 2024
1 parent 3acc17d commit 98f9012
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ jobs:
build-args: |
BUILD_VERSION=${{ github.ref_name }}
BUILD_GIT_COMMIT=${{ github.sha }}
BUILD_TIME="$(TZ=UTC date +"%Y-%m-%dT%H:%M:%S%z")"
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ FROM golang:1.22

# args
ARG TARGETARCH
ARG BUILD_TIME
ARG BUILD_VERSION
ARG BUILD_GIT_COMMIT
ARG GIN_MODE=release
Expand Down Expand Up @@ -46,7 +45,7 @@ RUN go mod download
COPY . ./

# Build the binary.
RUN go build -trimpath -ldflags="-s -w -X github.com/le0pard/postal_server/version.Version=$BUILD_VERSION -X github.com/le0pard/postal_server/version.GitCommit=$BUILD_GIT_COMMIT -X github.com/le0pard/postal_server/version.BuildTime=$BUILD_TIME" -v -o postal_server
RUN go build -trimpath -ldflags="-s -w -X github.com/le0pard/postal_server/version.Version=$BUILD_VERSION -X github.com/le0pard/postal_server/version.GitCommit=$BUILD_GIT_COMMIT -X github.com/le0pard/postal_server/version.BuildTime=\"$(TZ=UTC date +"%Y-%m-%dT%H:%M:%S%z")\"" -v -o postal_server

EXPOSE 8000
# Run the web service on container startup.
Expand Down

0 comments on commit 98f9012

Please sign in to comment.