mirror of
https://github.com/fosrl/newt.git
synced 2026-03-10 20:56:40 +00:00
Set newt version in dockerfile
This commit is contained in:
3
.github/workflows/cicd.yml
vendored
3
.github/workflows/cicd.yml
vendored
@@ -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 }}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user