fix(ci,docker): update version string and optimize Dockerfile
Some checks failed
docker / docker (push) Failing after 13s

This commit is contained in:
2025-11-20 11:18:03 +01:00
parent b0efae1514
commit 689dcb8406
2 changed files with 8 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ on:
- 'main' - 'main'
env: env:
VERSION: ${{ github.ref_name }}-${{ github.sha }} VERSION: ${{ github.ref_name }}-${{ github.sha[0:7] }}
jobs: jobs:
docker: docker:

View File

@@ -1,12 +1,11 @@
FROM golang:latest FROM golang:latest as builder
WORKDIR /app
WORKDIR /usr/src/app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download RUN go mod download
COPY . . COPY . .
RUN go build -v -o /usr/local/bin/svg-templater ./... RUN go build -v -o svg-templater ./...
RUN rm -rf ./*
CMD ["svg-templater"] FROM alpine:latest
WORKDIR /root/
COPY --from=builder /app/svg-templater /usr/local/bin/svg-templater
CMD ["./svg-templater"]