Disable cgo, add docker support
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
516390b17d
commit
7830955b4f
10
.drone.yml
10
.drone.yml
|
@ -11,6 +11,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p /build
|
- mkdir -p /build
|
||||||
- go mod download
|
- go mod download
|
||||||
|
- export CGO_ENABLED=0
|
||||||
- goc -o /build/dlrouter
|
- goc -o /build/dlrouter
|
||||||
environment:
|
environment:
|
||||||
GOOS: linux,windows,darwin
|
GOOS: linux,windows,darwin
|
||||||
|
@ -36,6 +37,15 @@ steps:
|
||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: registry.meow.tf/tyler/armbian-router
|
||||||
|
registry: registry.meow.tf
|
||||||
volumes:
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
temp: {}
|
temp: {}
|
|
@ -0,0 +1,11 @@
|
||||||
|
FROM golang:alpine AS builder
|
||||||
|
|
||||||
|
ADD . /src
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
RUN CGO_ENABLED=0 go build -o /src/dlrouter
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
COPY --from=builder /src/dlrouter /usr/bin/dlrouter
|
Loading…
Reference in New Issue