Merge pull request #37 from canghai908/master

use vendor
This commit is contained in:
ulricqin 2020-03-27 11:36:34 +08:00 committed by GitHub
commit bda2eae933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 12 deletions

26
.github/workflows/n9e.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build
run: ./control build

View File

@ -2,13 +2,7 @@ FROM golang AS builder
# RUN apk add --no-cache git gcc
WORKDIR /app
# comment this if using vendor
# ENV GOPROXY=https://mod.gokit.info
# COPY go.mod go.sum ./
# RUN go mod download
COPY . .
ENV GOPROXY=https://mod.gokit.info
RUN ./control build docker
FROM buildpack-deps:buster-curl

View File

@ -16,8 +16,6 @@ mkdir -p $GOPATH/src/github.com/didi
cd $GOPATH/src/github.com/didi
git clone https://github.com/didi/nightingale.git
cd nightingale
# export env[GOPROXY] if your network is not good
# export GOPROXY=https://mirrors.aliyun.com/goproxy/
./control build
```

View File

@ -16,8 +16,6 @@ mkdir -p $GOPATH/src/github.com/didi
cd $GOPATH/src/github.com/didi
git clone https://github.com/didi/nightingale.git
cd nightingale
# 如果网络环境不好可以尝试aliyun的mirror
# export GOPROXY=https://mirrors.aliyun.com/goproxy/
./control build
```

View File

@ -136,13 +136,13 @@ status()
build_one()
{
mod=$1
go build -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
go build -mod=vendor -o n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
}
build_docker()
{
mod=$1
go build -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
go build -mod=vendor -o bin/n9e-${mod} --tags "md5" src/modules/${mod}/${mod}.go
}
build()