From ee79fe9a7c0593cbd6a6ce8adff15340db8c4a66 Mon Sep 17 00:00:00 2001 From: Guoqiang Chen Date: Sun, 8 May 2022 16:52:21 +0000 Subject: [PATCH] Update actions --- .github/workflows/release.yml | 2 -- Dockerfile | 6 +++--- Makefile | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dfccd9..293613e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,8 +14,6 @@ env: jobs: release: runs-on: ubuntu-latest - environment: - name: production steps: - uses: actions/setup-go@v3 diff --git a/Dockerfile b/Dockerfile index fe6e903..42052e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ ############################### -FROM golang:1.14-alpine AS build +FROM golang:1.18-alpine AS build RUN mkdir -p /go/src/github.com/subchen/frep COPY . /go/src/github.com/subchen/frep WORKDIR /go/src/github.com/subchen/frep RUN apk add --no-cache make git -RUN make build-linux +RUN make clean build-linux ############################### -FROM alpine:3.11 +FROM alpine:3.15 COPY --from=build /go/src/github.com/subchen/frep/_releases/frep-* /usr/local/bin/frep diff --git a/Makefile b/Makefile index ef61916..21ab847 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ lint: build: go build -ldflags "$(LDFLAGS)" +build-linux: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ + go build -a -installsuffix cgo -ldflags "$(LDFLAGS)" -o _releases/frep-$(VERSION)-linux-amd64 + build-all: clean fmt CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ go build -a -installsuffix cgo -ldflags "$(LDFLAGS)" -o _releases/frep-$(VERSION)-linux-amd64