4 Commits

Author SHA1 Message Date
fee92259b1 Add distro to build repo stage, move docker up 2020-08-16 18:35:54 -04:00
c964c73824 Increment version 2020-08-16 18:31:45 -04:00
c2882857a4 Build docker image 2020-08-16 18:25:12 -04:00
f207f57536 Patch issue with v3 not being recognized 2020-06-15 20:48:47 -04:00
3 changed files with 26 additions and 2 deletions

View File

@ -43,6 +43,17 @@ steps:
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.meow.tf/ow-api/ow-api
registry: registry.meow.tf
tags:
- latest
- name: repo
image: tystuyfzand/drone-deb-simple
volumes:
@ -53,8 +64,8 @@ steps:
from_secret: upload_url
key:
from_secret: upload_key
distro: stable
files: [ '/build/*/owapi_*.deb' ]
volumes:
- name: build
temp: {}

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM golang:alpine AS builder
ADD . /build
RUN cd /build && go build -o ow-api
FROM golang:alpine
COPY --from=builder /build/ow-api /usr/bin/ow-api
CMD [ "/usr/bin/ow-api" ]

View File

@ -21,7 +21,7 @@ import (
)
const (
Version = "2.4.0"
Version = "2.4.2"
OpAdd = "add"
OpRemove = "remove"
@ -187,6 +187,8 @@ func injectPlatform(platform string, handler httprouter.Handle) httprouter.Handl
switch m[1] {
case "v2":
version = VersionTwo
case "v3":
version = VersionThree
}
ctx = context.WithValue(ctx, "version", version)