diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a3003c6..e0405a30 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: - go-version: '1.19.5' + go-version: '1.22.1' - name: Install dependencies run: go get . diff --git a/.gitignore b/.gitignore index 0b378f79..0a59fe05 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ .idea/ .vscode/ + +# Build artifact +./main diff --git a/Dockerfile b/Dockerfile index 49f08219..c5c7bf69 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ -FROM golang:1.19.5-buster as build -LABEL maintainer="Infinity Works" +FROM golang:1.22-bookworm as build +LABEL maintainer="githubexporter" ENV GO111MODULE=on -COPY ./ /go/src/github.com/infinityworks/github-exporter -WORKDIR /go/src/github.com/infinityworks/github-exporter +COPY ./ /go/src/github.com/githubexporter/github-exporter +WORKDIR /go/src/github.com/githubexporter/github-exporter RUN go mod download \ && go test ./... \ && CGO_ENABLED=0 GOOS=linux go build -o /bin/main -FROM alpine:3.17.5 +FROM alpine:3 RUN apk --no-cache add ca-certificates \ && addgroup exporter \ diff --git a/Makefile b/Makefile index faf2766f..0fd54f6c 100644 --- a/Makefile +++ b/Makefile @@ -7,4 +7,4 @@ test: @go test -v -race ./... build: - @go build ./... + @go build -o main diff --git a/docker-compose.yml b/docker-compose.yml index 0ba7a1a1..e30a9b64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - 9171 ports: - 9171:9171 - image: infinityworks/github-exporter:latest + image: githubexporter/github-exporter:latest environment: - REPOS= - GITHUB_TOKEN= diff --git a/go.mod b/go.mod index 2b6d0be4..4194ad1b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/githubexporter/github-exporter -go 1.19 +go 1.22 require ( github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37 diff --git a/go.sum b/go.sum index 9678b635..ad8a2789 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,7 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37 h1:Lm6kyC3JBiJQvJrus66He0E4viqDc/m5BdiFNSkIFfU= github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37/go.mod h1:+OaHNKQvQ9oOCr+DgkF95PkiDx20fLHpzMp8SmRPQTg= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -58,6 +59,7 @@ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175 google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/http/server.go b/http/server.go index f26d3183..274d0f21 100644 --- a/http/server.go +++ b/http/server.go @@ -27,7 +27,7 @@ func NewServer(exporter exporter.Exporter) *Server { Github Exporter

GitHub Prometheus Metrics Exporter

-

For more information, visit GitHub

+

For more information, visit GitHub

Metrics