From 55c58d882c4bec23d19e911199126dfcca133b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Sat, 14 Jan 2023 21:26:57 +0100 Subject: [PATCH] Publish a dev docker image It is build from the master branch. --- .build.yml | 11 +++++++++++ README.md | 2 ++ docker/Dockerfile-dev | 13 +++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 docker/Dockerfile-dev diff --git a/.build.yml b/.build.yml index 9296386..091fea3 100644 --- a/.build.yml +++ b/.build.yml @@ -1,5 +1,6 @@ image: archlinux packages: + - docker - go - revive - staticcheck @@ -20,3 +21,13 @@ tasks: - gofmt: | cd ntfy-alertmanager test -z $(gofmt -l .) + - dev-image: | + cd ntfy-alertmanager/docker + if [ "$BUILD_SUBMITTER" != "git.sr.ht" ] || [ "$(git rev-parse master)" != "$(git rev-parse HEAD)" ] + then + complete-build + fi + sudo systemctl start docker + ~/.local/bin/dockerhub_login + docker build -f Dockerfile-dev -t xenrox/ntfy-alertmanager:dev ./.. + docker push xenrox/ntfy-alertmanager:dev diff --git a/README.md b/README.md index b562a56..3fb7f77 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ A bridge between ntfy and Alertmanager. ## Installation Simply use go build or the [docker image] with [docker-compose file]. +`ntfy-alertmanager:latest` is built from the latest tagged release while +`ntfy-alertmanager:dev` is built from the master branch. ## Configuration diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev new file mode 100644 index 0000000..7040dd7 --- /dev/null +++ b/docker/Dockerfile-dev @@ -0,0 +1,13 @@ +FROM golang:alpine as build +WORKDIR /app + +COPY . . +RUN go build -o /app/ntfy-alertmanager + + +FROM alpine:latest +WORKDIR / + +COPY --from=build /app/ntfy-alertmanager /ntfy-alertmanager + +ENTRYPOINT [ "./ntfy-alertmanager" ]