forked from mdlayher/apcupsd_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephan Fudeus
committed
May 19, 2024
1 parent
3f531e5
commit 8cd6525
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Docker Build/Publish Release | ||
on: | ||
push: | ||
branches: | ||
- "build" | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build: | ||
uses: sfudeus/workflows/.github/workflows/docker-build-publish-branch.yaml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG GO_VERSION=1.22 | ||
FROM golang:${GO_VERSION} AS builder | ||
|
||
WORKDIR /build | ||
#ADD . /build | ||
|
||
ENV CGO_ENABLED=0 | ||
#RUN go build -o /build/apcupsd_exporter /build/cmd/apcupsd_exporter/main.go | ||
RUN go get -u github.com/mdlayher/apcupsd_exporter | ||
RUN go build -o /build/apcupsd_exporter $GOPATH/src/github.com/mdlayher/apcupsd_exporter/cmd/apcupsd_exporter/main.go | ||
|
||
FROM scratch | ||
COPY --from=builder /build/apcupsd_exporter /apcupsd_exporter | ||
LABEL maintainer="Stephan Fudeus <github@mails.fudeus.net>" | ||
|
||
ENTRYPOINT ["/apcupsd_exporter"] | ||
EXPOSE 9162 |