File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 22
22
password : ${{ secrets.DOCKER_PASSWORD }}
23
23
tag_with_ref : true
24
24
tag_with_sha : false
25
+
26
+ - name : " [debug version] build and push"
27
+ uses : docker/build-push-action@v1
28
+ with :
29
+ build_args : KEEP_SYMBOL=1
30
+ repository : projecteru2/core
31
+ username : ${{ secrets.DOCKER_USERNAME }}
32
+ password : ${{ secrets.DOCKER_PASSWORD }}
33
+ tag : ${{ github.sha }}-debug
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ FROM golang:alpine AS BUILD
4
4
RUN apk add --no-cache build-base musl-dev git curl make cmake
5
5
RUN git clone https://github.com/projecteru2/core.git /go/src/github.com/projecteru2/core
6
6
WORKDIR /go/src/github.com/projecteru2/core
7
+ ARG KEEP_SYMBOL
7
8
RUN make build && ./eru-core --version
8
9
9
10
FROM alpine:latest
Original file line number Diff line number Diff line change @@ -4,9 +4,12 @@ REPO_PATH := github.com/projecteru2/core
4
4
REVISION := $(shell git rev-parse HEAD || unknown)
5
5
BUILTAT := $(shell date +% Y-% m-% dT% H:% M:% S)
6
6
VERSION := $(shell git describe --tags $(shell git rev-list --tags --max-count=1) )
7
- GO_LDFLAGS ?= -s - X $(REPO_PATH ) /version.REVISION=$(REVISION ) \
7
+ GO_LDFLAGS ?= -X $(REPO_PATH ) /version.REVISION=$(REVISION ) \
8
8
-X $(REPO_PATH ) /version.BUILTAT=$(BUILTAT ) \
9
9
-X $(REPO_PATH ) /version.VERSION=$(VERSION )
10
+ ifneq ($(KEEP_SYMBOL ) , 1)
11
+ GO_LDFLAGS += -s
12
+ endif
10
13
11
14
grpc :
12
15
protoc --proto_path=./rpc/gen --go_out=plugins=grpc:./rpc/gen --go_opt=module=github.com/projecteru2/core/rpc/gen core.proto
You can’t perform that action at this time.
0 commit comments