From b4db347d261cb86709883cd331d19929c4a547de Mon Sep 17 00:00:00 2001 From: labbs Date: Thu, 21 Jan 2021 21:27:01 +0100 Subject: [PATCH 1/4] add Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..baaa8af --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM alpine:latest as release +RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +COPY github-actions-exporter . +CMD ["./github-actions-exporter"] \ No newline at end of file From f52c1cc444b1aa81eb809660a18c36d104e93d6d Mon Sep 17 00:00:00 2001 From: labbs Date: Thu, 21 Jan 2021 21:29:22 +0100 Subject: [PATCH 2/4] update dockerfile --- Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index baaa8af..d669cea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,11 @@ +FROM golang:1.15 as builder + + +WORKDIR /app +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/app + FROM alpine:latest as release RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* -COPY github-actions-exporter . -CMD ["./github-actions-exporter"] \ No newline at end of file +COPY --from=builder /app/bin/app . +CMD ["./app"] \ No newline at end of file From 98cef0addc5607b4a257ae5f55889f6b096e216e Mon Sep 17 00:00:00 2001 From: labbs Date: Thu, 21 Jan 2021 21:59:31 +0100 Subject: [PATCH 3/4] change go version --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb36b9c..a4e3a08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - uses: actions/setup-go@v1 + - uses: actions/setup-go@v2 with: - go-version: '1.13.5' + go-version: '1.15' - name: Build run: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o github-actions-exporter From 022d6b1ff0d76bd26fa77b69a947c83d50b1a1e0 Mon Sep 17 00:00:00 2001 From: labbs Date: Thu, 21 Jan 2021 22:00:12 +0100 Subject: [PATCH 4/4] bump version --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index dcd2087..c2ec49b 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ import ( "github-actions-exporter/metrics" ) -var version = "v1.5" +var version = "v1.5.1" // main init configuration func main() {