commit
bda2eae933
|
@ -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
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
4
control
4
control
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue