From 85195e0305852d9cdf36ac0b8a79bf63c3970eab Mon Sep 17 00:00:00 2001 From: aperezg Date: Sat, 24 Apr 2021 14:03:15 +0200 Subject: [PATCH] preparing token for go releaser and force version on docker --- .github/workflows/release.yml | 2 +- Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f68280..d7d3205 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,4 +24,4 @@ jobs: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_RELEASER }} diff --git a/Dockerfile b/Dockerfile index 4dcb1e3..b706059 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine AS build +FROM golang:1.16-alpine AS build LABEL MAINTAINER = 'Friends of Go (it@friendsofgo.tech)' @@ -6,7 +6,7 @@ RUN apk add --update git RUN apk add ca-certificates WORKDIR /go/src/github.com/friendsofgo/killgrave COPY . . -RUN export GO111MODULE=on && go mod tidy && TAG=$(git describe --tags --abbrev=0) \ +RUN go mod tidy && TAG=$(git describe --tags --abbrev=0) \ && LDFLAGS=$(echo "-s -w -X main.version="$TAG) \ && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o /go/bin/killgrave -ldflags "$LDFLAGS" cmd/killgrave/main.go