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