未验证 提交 bda2eae9 编写于 作者: U ulricqin 提交者: GitHub

Merge pull request #37 from canghai908/master

use vendor
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
......@@ -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
......
......@@ -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
```
......
......@@ -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
```
......
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册