Set newt version in dockerfile

This commit is contained in:
Owen
2026-03-08 11:26:22 -07:00
committed by Owen Schwartz
parent e1edbcea07
commit 44ca592a5c
2 changed files with 5 additions and 1 deletions

View File

@@ -269,6 +269,7 @@ jobs:
context: . context: .
push: true push: true
platforms: linux/amd64 platforms: linux/amd64
build-args: VERSION=${{ env.TAG }}
tags: | tags: |
${{ env.GHCR_IMAGE }}:amd64-${{ env.TAG }} ${{ env.GHCR_IMAGE }}:amd64-${{ env.TAG }}
${{ env.DOCKERHUB_IMAGE }}:amd64-${{ env.TAG }} ${{ env.DOCKERHUB_IMAGE }}:amd64-${{ env.TAG }}
@@ -393,6 +394,7 @@ jobs:
context: . context: .
push: true push: true
platforms: linux/arm64 platforms: linux/arm64
build-args: VERSION=${{ env.TAG }}
tags: | tags: |
${{ env.GHCR_IMAGE }}:arm64-${{ env.TAG }} ${{ env.GHCR_IMAGE }}:arm64-${{ env.TAG }}
${{ env.DOCKERHUB_IMAGE }}:arm64-${{ env.TAG }} ${{ env.DOCKERHUB_IMAGE }}:arm64-${{ env.TAG }}
@@ -509,6 +511,7 @@ jobs:
context: . context: .
push: true push: true
platforms: linux/arm/v7 platforms: linux/arm/v7
build-args: VERSION=${{ env.TAG }}
tags: | tags: |
${{ env.GHCR_IMAGE }}:armv7-${{ env.TAG }} ${{ env.GHCR_IMAGE }}:armv7-${{ env.TAG }}
${{ env.DOCKERHUB_IMAGE }}:armv7-${{ env.TAG }} ${{ env.DOCKERHUB_IMAGE }}:armv7-${{ env.TAG }}

View File

@@ -17,7 +17,8 @@ RUN go mod download
COPY . . COPY . .
# Build the application # Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /newt ARG VERSION=dev
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X main.newtVersion=${VERSION}" -o /newt
FROM public.ecr.aws/docker/library/alpine:3.23 AS runner FROM public.ecr.aws/docker/library/alpine:3.23 AS runner