mirror of
https://github.com/tiennm99/ghglance.git
synced 2026-10-05 04:13:48 +00:00
The Marketplace rejects ghstats as an action name, so the repo, Go module, binary, and action share the name ghglance instead. The demo workflow keeps reading the existing GHSTATS_TOKEN repo secret.
14 lines
531 B
Docker
14 lines
531 B
Docker
FROM golang:1.26-alpine@sha256:f85330846cde1e57ca9ec309382da3b8e6ae3ab943d2739500e08c86393a21b1 AS build
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
RUN go mod download || true
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/ghglance .
|
|
|
|
FROM alpine:3.21@sha256:48b0309ca019d89d40f670aa1bc06e426dc0931948452e8491e3d65087abc07d
|
|
RUN apk add --no-cache ca-certificates tzdata git
|
|
COPY --from=build /out/ghglance /usr/local/bin/ghglance
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|