diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ab24904..12efc96 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -35,6 +35,13 @@ changelog: - '^docs:' - '^test:' +dockers: + - image_templates: + - "forge.babariviere.com/babariviere/ntfy-bridge:{{ .Tag }}" + - "forge.babariviere.com/babariviere/ntfy-bridge:v{{ .Major }}" + - "forge.babariviere.com/babariviere/ntfy-bridge:v{{ .Major }}.{{ .Minor }}" + - "forge.babariviere.com/babariviere/ntfy-bridge:latest" + gitea_urls: api: https://forge.babariviere.com/api/v1 download: https://forge.babariviere.com diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0ceaad4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.21-buster as builder + +WORKDIR /app + +COPY go.* ./ +RUN go mod download + +COPY . ./ + +RUN go build -v -o ntfy-bridge + +FROM debian:buster-slim +RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + ca-certificates && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /app/ntfy-bridge /app/ntfy-bridge + +CMD ["/app/ntfy-bridge"]