File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,7 @@ jobs:
269269 context : .
270270 push : true
271271 platforms : linux/amd64
272+ build-args : VERSION=${{ env.TAG }}
272273 tags : |
273274 ${{ env.GHCR_IMAGE }}:amd64-${{ env.TAG }}
274275 ${{ env.DOCKERHUB_IMAGE }}:amd64-${{ env.TAG }}
@@ -393,6 +394,7 @@ jobs:
393394 context : .
394395 push : true
395396 platforms : linux/arm64
397+ build-args : VERSION=${{ env.TAG }}
396398 tags : |
397399 ${{ env.GHCR_IMAGE }}:arm64-${{ env.TAG }}
398400 ${{ env.DOCKERHUB_IMAGE }}:arm64-${{ env.TAG }}
@@ -509,6 +511,7 @@ jobs:
509511 context : .
510512 push : true
511513 platforms : linux/arm/v7
514+ build-args : VERSION=${{ env.TAG }}
512515 tags : |
513516 ${{ env.GHCR_IMAGE }}:armv7-${{ env.TAG }}
514517 ${{ env.DOCKERHUB_IMAGE }}:armv7-${{ env.TAG }}
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ RUN go mod download
1717COPY . .
1818
1919# Build the application
20- RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /newt
20+ ARG VERSION=dev
21+ RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X main.newtVersion=${VERSION}" -o /newt
2122
2223FROM public.ecr.aws/docker/library/alpine:3.23 AS runner
2324
You can’t perform that action at this time.
0 commit comments