Compare commits

..

2 Commits

Author SHA1 Message Date
c539e68486 P
Some checks failed
dev test / test (push) Successful in 41s
dev test / vulnCheck (push) Successful in 57s
dev test / Ci-Lint (push) Successful in 37s
${{ github.actor }} executed Build Push Prod / build (push) Successful in 4m26s
${{ github.actor }} executed Build Push Prod / deploy (push) Failing after 23s
2024-12-04 19:58:17 -04:00
9f19881416 REMOVE TIDY
Some checks failed
${{ github.actor }} executed Build Push Prod / deploy (push) Has been cancelled
${{ github.actor }} executed Build Push Prod / build (push) Has been cancelled
2024-12-04 19:54:12 -04:00
2 changed files with 16 additions and 9 deletions

View File

@ -24,9 +24,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: run tidy
run: |
go mod tidy
- name: test with go
run: go test -v ./...

View File

@ -1,7 +1,17 @@
FROM alpine:latest
ARG BINAME=tgbuser-grpc-linux-arm64-0.0.0_1
COPY ./bin/${BINAME} /usr/bin/tgbuser-grpc
RUN mkdir /app
WORKDIR /app
ENTRYPOINT tgbuser-grpc
FROM golang:alpine AS builder
ARG TARGETARCH
ARG version=not-set
ARG SHORTSHA=not-set
WORKDIR /app
COPY . .
# https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm
RUN go build -o bin/tgbuser \
-ldflags "-X main.Shortsha=${SHORTSHA} \
-X main.Version=${version} \
-X main.Aarch=${TARGETARCH}" ./cmd
FROM alpine AS runner
COPY --from=builder /app/bin/tgbuser /usr/bin/
WORKDIR /app
ENTRYPOINT /usr/bin/tgbuser